RadTileViewItem Maximized programatically using MVVM

3 posts, 0 answers
  1. Rodolfo
    Rodolfo avatar
    3 posts
    Member since:
    Jul 2016

    Posted 22 Aug Link to this post

    Hello I will appreciate your help with the Next I need to Maximized RadTileViewItem Programatically, But it is not running 

     

    My XAML

    <telerik:RadTileViewItem x:Name="rdTileViewMain" Header="Main" RestoredHeight="100" MinimizedHeight="200" RestoredWidth="80" Style="{StaticResource RadTileViewItemStyle}" BorderBrush="{x:Null}" SnapsToDevicePixels="True" Foreground="#FFFDFBFB" TileState="{Binding TileStaterdTileViewMain}">

     

    Then in my MainWindowViewModel:

         private TileViewItemState _TileStaterdTileViewMain;

         public TileViewItemState TileStaterdTileViewMain
            {
                get {
                    return _TileStaterdTileViewMain;
                }
                set {
                    _TileStaterdTileViewMain = value;
                    PropertyChanged(this, new PropertyChangedEventArgs("TileStaterdTileViewMain"));
                }

            }

     

       private void RaiseUpUcShopOrdersButtonControl(object parameter)
            {
                TileStaterdTileViewMain = Telerik.Windows.Controls.TileViewItemState.Maximized;

    }

     

  2. Dinko
    Admin
    Dinko avatar
    416 posts

    Posted 25 Aug Link to this post

    Hi Rodolfo,

    Thank you for contacting us.

    I am not sure about your implementation but I think the reason behind this is that you haven't set the Mode binding in XAML. In your case, you have set it to Mode=TwoWay.
    <telerik:RadTileViewItem x:Name="rdTileViewMain" Header="Main" RestoredHeight="100" MinimizedHeight="200" RestoredWidth="80" Style="{StaticResource RadTileViewItemStyle}" BorderBrush="{x:Null}" SnapsToDevicePixels="True" Foreground="#FFFDFBFB" TileState="{Binding TileStaterdTileViewMain,,Mode=TwoWay}">

    Give it a try and let me know if it works in your case.

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Rodolfo
    Rodolfo avatar
    3 posts
    Member since:
    Jul 2016

    Posted 25 Aug in reply to Dinko Link to this post

    Dinko Thanks so Much!! Now is working as you say I was ommitting the Mode=TwoWay

     

    Cheers!

Back to Top