c# - Accessing XAML controls in WPF -


i'm using code in .xaml, created user defined control(textbox) numerictextbox:

<local:numerictextbox grid.column="1"        local:numerictextbox.mask="decimal"        local:numerictextbox.maximumvalue="55"        local:numerictextbox.minimumvalue="0"        name="abc"        grid.row="0"        text="{binding path=ipaddressproperty}" /> 

i want access numerictextbox in .xaml.cs , have give minimum , maximum value in .xaml.cs file,

can me out please?

this question more readable if put xaml in original post.

you need give name in xaml:

<local:numerictextbox x:name="mytextbox" /> 

then can reference properties name in c# code-behind:

this.mytextbox.minimumvalue = 0; this.mytextbox.maximumvalue = 255; 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -