상속: Windows.UI.Xaml.Controls.Primitives.Selector, IFlipView
        public void InitializeComponent()
        {
            if (_contentLoaded)
            {
                return;
            }

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-resource://spotifyapp/Files/View/DetailPage.xaml"));

            CollectionViewSource = (Windows.UI.Xaml.Data.CollectionViewSource) this.FindName("CollectionViewSource");
            LayoutRoot           = (Windows.UI.Xaml.Controls.Grid) this.FindName("LayoutRoot");
            OrientationStates    = (Windows.UI.Xaml.VisualStateGroup) this.FindName("OrientationStates");
            Full           = (Windows.UI.Xaml.VisualState) this.FindName("Full");
            Fill           = (Windows.UI.Xaml.VisualState) this.FindName("Fill");
            Portrait       = (Windows.UI.Xaml.VisualState) this.FindName("Portrait");
            Snapped        = (Windows.UI.Xaml.VisualState) this.FindName("Snapped");
            FlipView       = (Windows.UI.Xaml.Controls.FlipView) this.FindName("FlipView");
            ApplicationBar = (Windows.UI.Xaml.Controls.ApplicationBar) this.FindName("ApplicationBar");
            NextPanel      = (Windows.UI.Xaml.Controls.StackPanel) this.FindName("NextPanel");
            NextButton     = (Windows.UI.Xaml.Controls.Button) this.FindName("NextButton");
            PreviousButton = (Windows.UI.Xaml.Controls.Button) this.FindName("PreviousButton");
            HomeButton     = (Windows.UI.Xaml.Controls.Button) this.FindName("HomeButton");
            BackButton     = (Windows.UI.Xaml.Controls.Button) this.FindName("BackButton");
            PageTitle      = (Windows.UI.Xaml.Controls.TextBlock) this.FindName("PageTitle");
        }
예제 #2
0
        public MainPage()
        {
            this.InitializeComponent();

            Condominio c1 = new Condominio("COND 1");
            Condominio c2 = new Condominio("COND 2");
            Condominio c3 = new Condominio("COND 3");
            Condominio c4 = new Condominio("COND 4");
            gerente.addCondominio(c1);
            gerente.addCondominio(c2);
            gerente.addCondominio(c3);
            gerente.addCondominio(c4);
            Bloco b1 = new Bloco(1);
            Bloco b2 = new Bloco(2);
            Bloco b3 = new Bloco(3);
            c1.addBloco(b1);
            c1.addBloco(b2);
            c2.addBloco(b3);

            //CONDOMINIOS
            listaCondominios = flipCond;
            listaCondominios.ItemsSource = gerente;

            //BLOCOS
            listaBlocos = listBlocos;
            listaBlocos.ItemsSource = listaCondominios.SelectedItem;
        }
예제 #3
0
        public void InitializeComponent()
        {
            if (_contentLoaded)
            {
                return;
            }

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///ItemDetailPage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);

            pageRoot              = (ContosoCookbook.Common.LayoutAwarePage) this.FindName("pageRoot");
            itemsViewSource       = (Windows.UI.Xaml.Data.CollectionViewSource) this.FindName("itemsViewSource");
            PageAppBar            = (Windows.UI.Xaml.Controls.AppBar) this.FindName("PageAppBar");
            LeftCommands          = (Windows.UI.Xaml.Controls.StackPanel) this.FindName("LeftCommands");
            RightCommands         = (Windows.UI.Xaml.Controls.StackPanel) this.FindName("RightCommands");
            BragButton            = (Windows.UI.Xaml.Controls.Button) this.FindName("BragButton");
            PinRecipeButton       = (Windows.UI.Xaml.Controls.Button) this.FindName("PinRecipeButton");
            flipView              = (Windows.UI.Xaml.Controls.FlipView) this.FindName("flipView");
            portraitFlipView      = (Windows.UI.Xaml.Controls.FlipView) this.FindName("portraitFlipView");
            snappedFlipView       = (Windows.UI.Xaml.Controls.FlipView) this.FindName("snappedFlipView");
            backButton            = (Windows.UI.Xaml.Controls.Button) this.FindName("backButton");
            pageTitle             = (Windows.UI.Xaml.Controls.TextBlock) this.FindName("pageTitle");
            ApplicationViewStates = (Windows.UI.Xaml.VisualStateGroup) this.FindName("ApplicationViewStates");
            FullScreenLandscape   = (Windows.UI.Xaml.VisualState) this.FindName("FullScreenLandscape");
            Filled             = (Windows.UI.Xaml.VisualState) this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState) this.FindName("FullScreenPortrait");
            Snapped            = (Windows.UI.Xaml.VisualState) this.FindName("Snapped");
        }
예제 #4
0
        private void XamlHost_ChildChanged(object sender, EventArgs e)
        {
            WindowsXamlHost windowsXamlHost = (WindowsXamlHost)sender;

            Windows.UI.Xaml.Controls.FlipView flipView =
                (Windows.UI.Xaml.Controls.FlipView)windowsXamlHost.Child;
            if (flipView == null)
            {
                return;
            }
            var dataTemplate = (Windows.UI.Xaml.DataTemplate)XamlReader.Load(@"
<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">
  <Grid Margin=""5"">
      <Grid.RowDefinitions>
         <RowDefinition Height=""*"" />
         <RowDefinition Height=""40"" />
      </Grid.RowDefinitions>
      <Image Source=""{Binding PhotoUrl}"" Grid.Row=""0"" Margin=""5""
            Stretch=""Uniform"" />
      <TextBlock Text=""{Binding UserName}"" HorizontalAlignment=""Center""
            VerticalAlignment=""Center"" Grid.Row=""1""/>
  </Grid>
</DataTemplate>");

            flipView.ItemTemplate = dataTemplate;
            flipView.ItemsSource  = ((MainViewModel)DataContext).Photos;
        }
예제 #5
0
        public ProgressManager(FlipView mainContent, StackPanel progressLayer, ProgressRing progressRingHandler)
        {
            this.mainContent = mainContent;
            this.progressLayer = progressLayer;
            this.progressRingHandler = progressRingHandler;

            this.progressRingHandler.IsActive = true;
            this.progressLayer.Visibility = Visibility.Visible;
            this.mainContent.Visibility = Visibility.Collapsed;
        }
#pragma warning disable CS0435 // Namespace conflicts with imported type
        protected override void OnElementChanged(ElementChangedEventArgs <CarouselView> e)
#pragma warning restore CS0435 // Namespace conflicts with imported type
        {
            base.OnElementChanged(e);

            if (e.OldElement != null)
            {
                // Controller.CollectionChanged -= OnCollectionChanged;

                _flipView.SelectionChanged -= SelectionChanged;

                var itemsSource = (ItemsSource)_flipView.ItemsSource;
                _flipView.ItemsSource = null;
                itemsSource?.Dispose();

                _itemsSource.Dispose();
                _itemsSource = null;
            }

            if (e.NewElement != null)
            {
                if (Element != null)
                {
                    if (_flipView == null)
                    {
                        _flipView = new FlipView {
                            IsSynchronizedWithCurrentItem = false,
                            ItemTemplate = (WDataTemplate)WApp.Current.Resources["ItemTemplate"]
                        };

                        _flipView.LayoutUpdated += (o, a) => {
                            if (_initialPosition == null)
                            {
                                return;
                            }

                            _flipView.SelectedIndex = (int)_initialPosition;
                            _initialPosition        = null;
                        };
                    }

                    _itemsSource                = new ControllerAsList(Element);
                    _flipView.ItemsSource       = new ItemsSource(_itemsSource);
                    _flipView.SelectionChanged += SelectionChanged;
                    _initialPosition            = Element.Position;

                    // Controller.CollectionChanged += OnCollectionChanged;
                }

                if (_flipView != Control)
                {
                    SetNativeControl(_flipView);
                }
            }
        }
예제 #7
0
        private void FlipView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            FlipView flipView1 = new FlipView();
            flipView1.Items.Add("Item 1");
            flipView1.Items.Add("Item 2");
            flipView1.Items.Add("Item 3");
            flipView1.Items.Add("Item 4");
            flipView1.Items.Add("Item 5");
            flipView1.SelectionChanged += FlipView_SelectionChanged;

        }
예제 #8
0
        public ChapterViewModel(Chapter chapter, FlipView flipView)
        {
            sizeChangedEventHandler = new SizeChangedEventHandler(textBlockResized);
            loadedEventHandler = new RoutedEventHandler(checkOverflow);
            this.flipView = flipView;
            this.chapter = chapter;
            this.Overflows = new List<RichTextBlockOverflow>();

            Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
            string currentChapter = (string)localSettings.Values["currentChapter"];
            if (currentChapter == null || currentChapter == "")
            {
                currentChapter = "jhn.1.esv";
            }
            ChangeChapter(currentChapter);
        }
        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///ItemDetailPage1.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (StreetFoo.Client.UI.Common.LayoutAwarePage)this.FindName("pageRoot");
            itemsViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("itemsViewSource");
            flipView = (Windows.UI.Xaml.Controls.FlipView)this.FindName("flipView");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
        }
        public void InitializeComponent()
        {
            if (_contentLoaded)
            {
                return;
            }

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///ItemDetailPage1.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);

            pageRoot            = (StreetFoo.Client.UI.Common.LayoutAwarePage) this.FindName("pageRoot");
            itemsViewSource     = (Windows.UI.Xaml.Data.CollectionViewSource) this.FindName("itemsViewSource");
            flipView            = (Windows.UI.Xaml.Controls.FlipView) this.FindName("flipView");
            backButton          = (Windows.UI.Xaml.Controls.Button) this.FindName("backButton");
            pageTitle           = (Windows.UI.Xaml.Controls.TextBlock) this.FindName("pageTitle");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState) this.FindName("FullScreenLandscape");
            Filled             = (Windows.UI.Xaml.VisualState) this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState) this.FindName("FullScreenPortrait");
            Snapped            = (Windows.UI.Xaml.VisualState) this.FindName("Snapped");
        }
예제 #11
0
        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///DetailPage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (NoelBlogReader.Common.LayoutAwarePage)this.FindName("pageRoot");
            itemsViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("itemsViewSource");
            PopInStoryboard = (Windows.UI.Xaml.Media.Animation.Storyboard)this.FindName("PopInStoryboard");
            contentViewBorder = (Windows.UI.Xaml.Controls.Border)this.FindName("contentViewBorder");
            flipView = (Windows.UI.Xaml.Controls.FlipView)this.FindName("flipView");
            contentView = (Windows.UI.Xaml.Controls.WebView)this.FindName("contentView");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
        }
        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///DetailPage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (TheBellyofAuthority.Common.LayoutAwarePage)this.FindName("pageRoot");
            LikeButton = (Windows.UI.Xaml.Controls.Button)this.FindName("LikeButton");
            flipView = (Windows.UI.Xaml.Controls.FlipView)this.FindName("flipView");
            contentView = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("contentView");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            UserPanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("UserPanel");
            LabelBox = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("LabelBox");
            UserBox = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("UserBox");
            ApplicationViewStates = (Windows.UI.Xaml.VisualStateGroup)this.FindName("ApplicationViewStates");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
        }
        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-resource://spotifyapp/Files/View/DetailPage.xaml"));

            CollectionViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("CollectionViewSource");
            LayoutRoot = (Windows.UI.Xaml.Controls.Grid)this.FindName("LayoutRoot");
            OrientationStates = (Windows.UI.Xaml.VisualStateGroup)this.FindName("OrientationStates");
            Full = (Windows.UI.Xaml.VisualState)this.FindName("Full");
            Fill = (Windows.UI.Xaml.VisualState)this.FindName("Fill");
            Portrait = (Windows.UI.Xaml.VisualState)this.FindName("Portrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            FlipView = (Windows.UI.Xaml.Controls.FlipView)this.FindName("FlipView");
            ApplicationBar = (Windows.UI.Xaml.Controls.ApplicationBar)this.FindName("ApplicationBar");
            NextPanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("NextPanel");
            NextButton = (Windows.UI.Xaml.Controls.Button)this.FindName("NextButton");
            PreviousButton = (Windows.UI.Xaml.Controls.Button)this.FindName("PreviousButton");
            HomeButton = (Windows.UI.Xaml.Controls.Button)this.FindName("HomeButton");
            BackButton = (Windows.UI.Xaml.Controls.Button)this.FindName("BackButton");
            PageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("PageTitle");
        }
 public void Remove(FlipView display)
 {
     if (display.SelectedItem != null)
     {
         collection.Remove(collection.Where(w => w.Id ==
         ((Music)display.SelectedValue).Id).Single());
         write();
     }
 }
    public void Add(FlipView display)
    {

        collection.Insert(0, new Music());
        display.SelectedIndex = 0;
    }
    public async void Delete(FlipView display)
    {
        try
        {
            collection = new ObservableCollection<Music>();
            display.ItemsSource = Collection;
            file = await ApplicationData.Current.LocalFolder.GetFileAsync(filename);
            await file.DeleteAsync();
        }
        catch
        {

        }
    }
예제 #17
0
        private void AddGalleries(string source)
        {
            string[] itens = source.Split(new string[] { "MeninaCuriosa#Gallery" }, StringSplitOptions.None);

            this.AddText(itens[0]);

            //Add Gallery
            FlipView flip = new FlipView();
            flip.ItemTemplate = (DataTemplate)this.Resources["templateFlipView"];
            flip.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Stretch;
            flip.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Stretch;
            flip.MaxHeight = 250;
            flip.Background = new SolidColorBrush(Colors.Black);
            flip.Items.Add(1);
            flip.Loaded += flip_Loaded;

            stk_content.Children.Add(flip);
        }