I created a new windows 10 app, In solution file common main page is created for windows and windows phone, now i want display button only in windows app, not in windows phone app, is it possible please help me..
<Grid x:Name="menu">
<Button x:name="btn1" content="click"/>
</Grid>
I want to display this button only in window , not for Phone app, how to disable in windows phone..
There are many ways in which you can do this.
1) Using device-family either in code behind or as another xaml
See this tutorial you will get the idea.
2) Now if you want you can also use Viewstates along with Adaptive triggers which is simple but these will work even when desktop app is resized to avoid that you will have to create device specific triggers. check out WindowsStateTriggers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With