Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



CheckBox in SilverLight

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 05-08-2010
Member
 
Join Date: Sep 2009
Posts: 177
CheckBox in SilverLight
  

Hello,
I started in Silverlight and I try to recover the checkbox 1 to 7. I try everything and it does not work, here is the code.

Code:
for (x = 1; x <= 7; x + +) 
(if ((CheckBox) this.Controls ["CheckBox" + x]. IsChecked == true) (/ / code))
If you have an sample source code for this, then that will help me. Thank you.

Reply With Quote
  #2  
Old 05-08-2010
Member
 
Join Date: Mar 2010
Posts: 200
Re: CheckBox in SilverLight

What you want to retrieve the state of your checkbox?

- In an event handler? it would be the rather something like
Code:
if ((sender as checkbox). IsChecked == true)
-Or in a function called as needed and which scans the status of components on your page?
in this case I still want to spend
Code:
this.children [i]. Name = "Chekbox" + system.convert.tostring (i)
and i varies between 0 and the number of accurately on your page this.children.count but not very optimized EST! syntax this.control I do not know

Whether you are looking to do exactly?
Reply With Quote
  #3  
Old 05-08-2010
Member
 
Join Date: Sep 2009
Posts: 177
Re: CheckBox in SilverLight

Infact the checkbox are the days of the week and depending on whether the checkbox is checked or not, there posters. This after the click on the refresh button. So, if you have any other idea other that this then please let me know. Thanks for your replies.
Reply With Quote
  #4  
Old 05-08-2010
Member
 
Join Date: Nov 2009
Posts: 343
Re: CheckBox in SilverLight

It is not this.Controls but Panle.Children. Otherwise you can use the Binding it's so much easier. You created a class with 2 Day Property Name and Enabled and then you bind the Enabled on the Check of your CheckBox. When you want to know what is checked you walk your <Day> List and you look at the values Enabled.
Reply With Quote
  #5  
Old 05-08-2010
Member
 
Join Date: Sep 2009
Posts: 177
Re: CheckBox in SilverLight

Yes the problem is the bin, it do not already long since I start with c # winforms. But I find nothing in silverlight, I have had trouble making a drag and drop. You think it's the easiest Binding? For me, this I thought I could do my small loop.
Code:
for (x = 1; x <= 7; x + +) (if ((CheckBox) grid3.Children ["CheckBox" + x]. IsChecked == true) (/ / code))
Reply With Quote
  #6  
Old 05-08-2010
Member
 
Join Date: Dec 2009
Posts: 192
Re: CheckBox in SilverLight

Check out the following code, this will help you

Code:
public static class Week
(
    public static IEnumerable <dy> Days
    (
        gt
        (
            return new dy[] 
            (
                new dy("Monday"),
                new dy("Tuesday"),
                new dy("Wednesday"),
                new dy("Thursday "),
                new dy("Friday"),
                new dy("Saturday"),
                new dy("Sunday")
            );
        )
    )
)
 
public class dy
(
    public string nm ( gt; st; )
    public bool IsEnabled ( gt; st; )
 
    public dy(String nm)
    (
        nm = nm;
    )
)
Reply With Quote
  #7  
Old 17-08-2010
Member
 
Join Date: Jan 2010
Posts: 70
Re: CheckBox in SilverLight

Infact the goal is to achieve a kind of outlook calendar for cons I failed to make the component. So, I made a grid with 7 rows and 12 columns, and there are 7 column 0 label on the grid for days, and 12 up for hours. Except that now the thing must be dynamic so if I check off Monday, Tuesday, Wednesday, Thursday, Friday and I click on "Refresh" eh bin label should disappear on Saturday and Sunday. I set for Monday label1, label2 Tuesday similar for the checkbox.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "CheckBox in SilverLight"
Thread Thread Starter Forum Replies Last Post
How to install SilverLight 5 beta and SilverLight 4 on same Computer Mandarmalika Windows Software 3 17-04-2011 04:55 PM
XAML Processing Differences Between Silverlight 3 and Silverlight 4 wllwnn Guides & Tutorials 2 09-08-2010 09:41 AM
Hidden Checkbox Grayed Out Waman Operating Systems 3 22-10-2009 11:21 AM
Input Type Checkbox raviranch Software Development 5 14-04-2009 03:07 PM
How to Build a Dynamic Checkbox ? RIMON Software Development 1 28-03-2009 12:20 PM


All times are GMT +5.5. The time now is 01:40 PM.