Home > other >  Why do simple} {x: Static XXX in the run times wrong, and design is no problem
Why do simple} {x: Static XXX in the run times wrong, and design is no problem

Time:09-20

XMLNS="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
XMLNS: x="http://schemas.microsoft.com/winfx/2006/xaml"
XMLNS: d="http://schemas.microsoft.com/expression/blend/2008"
XMLNS: MC="http://schemas.openxmlformats.org/markup-compatibility/2006"
XMLNS: local="CLR namespace: Test_X_Static"
XMLNS: prop="CLR - namespace: Test_X_Static Properties "
MC: Ignorable="d"
Title="MainWindow" Height="350" Width="525" & gt;



The
reference


When the design has already shown the correct values


Why the Debug to start so abnormal

CodePudding user response:

The content posted in the "view detailed information" see?

CodePudding user response:

Error details are as follows:

CodePudding user response:

Hint of clear, cannot think when static property, put the static attribute values in the ViewModel layer or Windows background for binding,

CodePudding user response:

Finally found the answer in other people's problems, is the Resource. Resx access needs to be modified for the public, and can't be a internal

CodePudding user response:

The Binding prop: Resources. The Name

CodePudding user response:

The Text property of TextBlock should need binding.
  • Related