I
I
iki900092017-12-10 15:44:23
WPF
iki90009, 2017-12-10 15:44:23

How to force XAML to use a static variable for Binding?

XAML C#
<TextBox Text="{Binding ClassG.TText ></TextBox>

public static class ClassG
  {
    public static string TText = "Tex";

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sumor, 2017-12-10
@Sumor

<TextBox Text="{x:Static local:ClassG.TText ></TextBox>

local must be added to the list of used namespaces: xmlns:local=...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question