예제 #1
0
        private void Points_Click(object sender, RoutedEventArgs e)
        {
            if (LatticePathDisplay.CurrentPath == null)
            {
                return;
            }
            SettingsFlyout settings = new SettingsFlyout();

            // set the desired width.  If you leave this out, you will get Narrow (346px)
            settings.FlyoutWidth = Callisto.Controls.SettingsFlyout.SettingsFlyoutWidth.Wide;

            // optionally change header and content background colors away from defaults (recommended)
            // if using Callisto's AppManifestHelper you can grab the element from some member var you held it in
            settings.HeaderBrush = new SolidColorBrush(App.VisualElements.BackgroundColor);
            //settings.HeaderBrush = new SolidColorBrush(Colors.Orange);
            settings.HeaderText             = "Points"; // string.Format("{0}", App.VisualElements.DisplayName);
            settings.ContentBackgroundBrush = LatticePathDisplay.CanvasBackgroundBrush;
            // provide some logo (preferrably the smallogo the app uses)
            BitmapImage bmp = new BitmapImage(App.VisualElements.SmallLogoUri);

            settings.SmallLogoImageSource = bmp;
            PointsControl pc = new PointsControl();

            pc.DataContext = LatticePathDisplay.CurrentPath.AllPoints;
            //pc.SelectedPath = 0;
            settings.Content = pc;
            // open it
            settings.IsOpen = true;
        }
예제 #2
0
        public LoadingIndicator()
        {
            Visibility = IsLoading ? Visibility.Visible : Visibility.Collapsed;
            InitializeComponent();
            var myBinding = new Binding {
                Source = Points
            };

            PointsControl.SetBinding(ItemsControl.ItemsSourceProperty, myBinding);
        }