TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
James Cooper
NA
3
2.1k
WPF-Radio button and checkbox validation using if statements
May 17 2015 11:55 PM
Hi i am quite new to programming so the syntax is still very confusing for me.
My problem is I want to add an option when the user checks radio button(warranty) (adding 10% to the subAmount using an if statement.
I am using...
if (threeYearRadioButton.IsChecked == true)
{
threeYearRadioButton = threeYearWarranty;
}
threeYearRadioButton(is the name of the radio button in my xaml code)
double threeYearWarranty = 0.1d; (is the name i have used to define in my cs code)
If the user checks one year there is no charge on top of the subAmount.
If three years is selected then 10% is added on top of the SubAmount and
five years = 20% added on top of the subAmount.
I am having the same issue with checkboxes:
If the user checks "totalWindowTinting", then $150 is added to the subAmount. int totalWindowTinting = 150;
If the user does not check the window tinting box then there will be no additional price added to the SubAmount.
I know i need to use an if statement, but it just comes up with errors wen i start using the ISChecked property.
please help!
Thanks,
James
Reply
Answers (
3
)
[WPF] Storyboard and Mouse Over
Filename is empty in SaveDialogue