复选框选择应确保结构值可以动态选择. [英] Check box selection should ensure struct value to select dynamically.

查看:81
本文介绍了复选框选择应确保结构值可以动态选择.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的WPF应用程序中,基于选择
,我有一个复选框(打印)

Hi All,

In my WPF Application, I have a Check box(print), based on the selection

public struct _PrintState{
         public byte my_current_value;
          public byte my_previous_value;
....
...
}



//MyOtherFile.xaml.cs



//MyOtherFile.xaml.cs

_PrintState PRINTSTATE;

public void Print_Func()
{
PRINTSTATE  my_current_value = 0;// value should be 1 if PrintChk is selected.
PRINTSTATE  my_previous_valuee = 0;
....
}


根据Print.Xaml的选择,对于Checkbox(即PrintChk),则仅my_current_value = 1的值;如果没有其他说明.

在此先感谢.

问候,
Samanth_90


Based on Selection of Print.Xaml , for Checkbox, viz., PrintChk then only the value of my_current_value =1; if not otherwise.

Thanks in Advance.

With Regards,
Samanth_90

推荐答案

我是WPF的新手,但是我认为您可以将复选框绑定到基础值.奇怪的是,我在阅读 Sacha [ WPF:初学者指南-n的第5部分 [
I am very much a newcomer to WPF, but I think you can bind your checkbox to the underlying value. Strangely enough I was reading Sacha[^]''s WPF: A Beginner''s Guide - Part 5 of n[^] which covers Databinding, only yesterday.


这篇关于复选框选择应确保结构值可以动态选择.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆