Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Add anchorables to different sides using ILayoutUpdateStrategy in MVVM

$
0
0
Hi,
Maybe this could help :
<xcad:LayoutRoot.LeftSide>
                  <xcad:LayoutAnchorSide>
                     <xcad:LayoutAnchorGroup x:Name="group">
                        <xcad:LayoutAnchorable Title="Agenda"
                                               ContentId="agenda"
                                               IconSource="../Images/address-book-open.png">
                           <TextBlock Text="Agenda Content"
                                      Margin="10"
                                      FontSize="18"
                                      FontWeight="Black"
                                      TextWrapping="Wrap" />
                        </xcad:LayoutAnchorable>
                        <xcad:LayoutAnchorable Title="Contacts"
                                               ContentId="contacts"
                                               IconSource="../Images/address-book--pencil.png">
                           <TextBlock Text="Contacts Content"
                                      Margin="10"
                                      FontSize="18"
                                      FontWeight="Black"
                                      TextWrapping="Wrap" />
                        </xcad:LayoutAnchorable>
                     </xcad:LayoutAnchorGroup>
                  </xcad:LayoutAnchorSide>
               </xcad:LayoutRoot.LeftSide>
 private void Button_Click_1( object sender, RoutedEventArgs e )
    {
      var la = new LayoutAnchorable()
      {
        Title = "Added",
        ContentId = "added",
        Content = new TextBlock()
        {
          Text = "Added Text"
        }
      };

      group.Children.Add( la );
      la.IsSelected = true;
      la.IsActive = true;
    }

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>