Esempio n. 1
0
        private void AddExample(IpaSymbol ipaSymbol)
        {
            TextBlock letterBlock = new TextBlock();

            letterBlock.Style = this.Resources["LetterStyle"] as Style;
            letterBlock.Text  = ipaSymbol.Value;

            TextBlock exampleBlock = new TextBlock();

            exampleBlock.Style = this.Resources["ExampleStyle"] as Style;
            IpaSymbol.SetExampleBlock(exampleBlock);

            StackPanel stackPanel = new StackPanel();

            stackPanel.VerticalAlignment = VerticalAlignment.Center;
            stackPanel.Children.Add(letterBlock);
            stackPanel.Children.Add(exampleBlock);

            Grid grid = new Grid();

            grid.Background = ipaSymbol.BackgroundBrush;
            grid.Height     = Window.Current.Bounds.Height;
            grid.Children.Add(stackPanel);

            WordsPanel.Children.Add(grid);
            WordsPanel.InvalidateArrange();
            Debug.WriteLine(grid.ActualHeight);
            //Debug.WriteLine(WordsPanel.Children.Count);
        }
Esempio n. 2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            IpaSymbol ipaSymbol = e.Parameter as IpaSymbol;

            this.DataContext = ipaSymbol;
            IpaSymbol.SetExampleBlock(ExampleBlock);
        }
 private void DisplaySymbol(IpaSymbol ipaSymbol)
 {
     SymbolGrid.DataContext = ipaSymbol;
     IpaSymbol.SetExampleBlock(ExampleBlock);
 }