top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

WindowsPhone Styles:Get and apply Explicit style with c#?

+1 vote
38 views
WindowsPhone Styles:Get and apply Explicit style with c#?
posted Jun 17, 2015 by Puhal

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
Not able to understand the query

2 Answers

+1 vote

See in below there is explicit style name is "MyCustomStyle" for TextBlock,so you can get this style with c# and apply like this.

App.xaml

<Application.Resources>
        <Style x:Key="MyCustomStyle" TargetType="TextBlock">
            <Setter Property="FontSize" Value="8" />
        </Style>
</Application.Resources>

C

Txtblk.Style = (Style)App.Current.Resources["MyCustomstyle"];

answer Jun 18, 2015 by Jdk
–1 vote

BY using C command and also use # tag to improve the power

answer Jun 17, 2015 by Shiv Shukla
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...