Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

how to change xaml content dynamically using c# with dynamic attrubutes?

$
0
0

i have a code:

Xaml:

<TextBlock x:Name="MondayTest"  /><TextBlock x:Name="TuesdayTest" />               

c#

string todayDay = System.DateTime.Today.DayOfWeek.ToString(); switch (todayDay){

case "Sunday": case "Monday": //any idea to put string today+Test.Text="today is "+ today? // here the textblock sundayTest must be selected //if todayDay is sunday ,textblock mondayTest must be //selected if todayDay is monday break; default: //default value break; }


thanks for help !!

                      


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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