This is a migrated thread and some comments may be shown as answers.

RadTileViewItem Maximized programatically using MVVM

2 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rodolfo
Top achievements
Rank 1
Rodolfo asked on 22 Aug 2017, 10:47 AM

Hello I need to Maximize RadTileViewItem Programatically  Using the MVVM concept 

But when I run it doesn't happens 

 

 

My XAML is this :

 <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}">
                                <Grid x:Name="grdMain">
                                    <Grid x:Name="grdProcessInfo" Visibility="{Binding GrdProcessInfoVisibility}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="576.8"/>
                                            <RowDefinition />
                                        </Grid.RowDefinitions>

                                        <Border x:Name="pnlShopOrder" CornerRadius="5" Margin="5,10,5,462.8" BorderBrush="{StaticResource AccentBrush}" BorderThickness="1" Grid.Column="0" Grid.Row="0">
                                            <TextBlock x:Name="txtShopOrder" Grid.Column="1" Grid.Row="0" Style="{StaticResource ProcessInfoMainStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding ProcessShopOrder}" TextWrapping="Wrap"></TextBlock>
                                        </Border>
                                        <Border x:Name="pnlInfoMeter" CornerRadius="5" Margin="0,119,0,354.8" BorderBrush="{StaticResource AccentBrush}" BorderThickness="1" Grid.Column="0">
                                            <TextBlock x:Name="txtInfoMeter" Grid.Column="1" Grid.Row="0" Style="{StaticResource ProcessInfoMainStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding ProcessInfoMeter}" TextWrapping="Wrap"></TextBlock>
                                        </Border>
                                        <Border x:Name="pnlProcessStepStatus" CornerRadius="5" Margin="0,234,-0.2,228.8" BorderBrush="{StaticResource AccentBrush}" BorderThickness="1" Grid.Column="0" Grid.ColumnSpan="2">
                                            <TextBlock x:Name="txtProcessStepStatus" Grid.Column="1" Grid.Row="0" Style="{StaticResource ProcessInfoMainStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding ProcessStepStatus}" TextWrapping="Wrap"></TextBlock>
                                        </Border>

                                        <Border x:Name="pnlProcessStatus" CornerRadius="5" Margin="0,353,-0.2,109.8" BorderBrush="{StaticResource AccentBrush}" BorderThickness="1" Grid.Column="0" Grid.ColumnSpan="2">
                                            <TextBlock x:Name="txtProcessStatus" Grid.Column="1" Grid.Row="0" Style="{StaticResource ProcessInfoMainStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding ProcessStaus}" TextWrapping="Wrap"></TextBlock>
                                        </Border>
                                        <Border x:Name="pnlProcessImg" CornerRadius="5" Margin="5,5,-0.2,2.8" Background="White" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="0" Width="0">
                                            <Image x:Name="imgProcess" HorizontalAlignment="Left" VerticalAlignment="Top" Source="{Binding ProcessImageSource}" Height="200" />
                                        </Border>
                                    </Grid>
                                </Grid>
                            </telerik:RadTileViewItem>

 

Then in my mainWindowViewModel I have

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;
   
        }

 

Can someone help me to know If I missing something?

Thanks 
        

 

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 25 Aug 2017, 08:31 AM
Hi Rodolfo,

This thread seems to be a duplicate to this forum. Can you try the suggested approach there and let me know if it works for you.

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 you to write beautiful native mobile apps using a single shared C# codebase.
0
Rodolfo
Top achievements
Rank 1
answered on 25 Aug 2017, 09:27 AM

Yes Sorry is a duplicated Thread I try the what you sugguest me on the original post ans yes it works.

Thanks so much!!

Tags
General Discussions
Asked by
Rodolfo
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Rodolfo
Top achievements
Rank 1
Share this question
or