Snapped View in Windows 8 Store App Xaml/C++
I am making a Windows App in c++ in which i want to use Snap View. I used my C# code and transform it into C++ but it didn't work. But it's working in c#. Here is my Xaml Code
Snapped">
FullScreen">
SnappedGrid" Storyboard.TargetProperty="Visibility">
MainGrid" Storyboard.TargetProperty="Visibility">
SnappedGrid" Visibility="Collapsed" Margin="0,0,0,0" Background="#FF16201F">
MainGrid" Width="1096" Visibility="Visible">
And Here is my C++ Code
void Main_Menu::Current_SizeChanged(Object^ sender, WindowSizeChangedEventArgs^ e)
{
if (Window::Current->Bounds.Width <= 875)
{
VisualStateManager::GoToState(this, "Snapped", true);
}
else
{
VisualStateManager::GoToState(this, "FullScreen", true);
}
}
Now please tell me where i am wrong?Do i have to add something in 'Main_Menu(){}' function?? Because it runs perfectly in c#
Replies
Know the answer? Post it — somebody with the same question will find it here.