c# - How do you style a single TextBox among others? -
i have wpf textbox among others create style for.
this style should apply type of textbox.
here textbox:
<textbox text="{binding deviceinformation.serialnumber, mode=oneway}" borderthickness="0" background="transparent" isreadonly="true"/>
my text box simulates label can copy.
how make style , target textbox?
if set key
property on style
definition, applied on textboxes have set style. style={staticresource=examplekey}
example:
<window.resources> <style targettype="textbox" x:key="examplestyle"> <setter property="borderthickness" value="0"></setter> </style> </window.resources>
you can have application-wide styles defined in app.xaml
Comments
Post a Comment