|
-
Jun 30th, 2009, 12:44 PM
#1
Thread Starter
Hyperactive Member
WPF Forms
I have 2 questions the first one is about the toolbar control in wpf. I just want it to look like a normal bar without the "ribbon dropdown thingamajig", is that possible? The other one is when I click a button in wpf I want it to look like its clicked and when I click it again I want it released. Is this possible and if so any links or help is appreciated.
If I helped you please rate me.
-
Jun 30th, 2009, 01:58 PM
#2
Re: WPF Forms
There's a WPF forum, perhaps try it there. I'm sure this thread will be moved soon enough though, there's no need to double post.
-
Jun 30th, 2009, 02:15 PM
#3
Re: WPF Forms
not sure about the toolbnar issue.... but for the button, try a checkbox with its style set to "graphical" (I think that's right) that will make it look like a button that can be toggled on & off.
-tg
-
Jun 30th, 2009, 03:13 PM
#4
Thread Starter
Hyperactive Member
Re: WPF Forms
Thanks didnt realize there was a wpf forum lol. I tried doing the checkbox thing techgnome but I could not find the setting to change to graphical. A little help. Also any mod please move this to the WPF forum and sorry for the inconvenience
If I helped you please rate me.
-
Jun 30th, 2009, 03:18 PM
#5
Re: WPF Forms
Thread moved to "WPF, WCF, WF" forum
(thanks for letting us know tg )
-
Jul 1st, 2009, 03:02 AM
#6
Re: WPF Forms
 Originally Posted by ngreenwood6
I tried doing the checkbox thing techgnome but I could not find the setting to change to graphical. A little help. Also any mod please move this to the WPF forum and sorry for the inconvenience
The CheckBox and RadioButton classes both inherit the ToggleButton class, which is not in the Toolbox. If you add a CheckBox and then change the XAML to <ToggleButton> instead then you'll get the effect you're looking for.
Note that I've never actually used WPF before and I just found that information by Googling checkbox button wpf, following a link to StackOverflow and then looking up MSDN for the ToggleButton they mentioned.
Last edited by jmcilhinney; Jul 1st, 2009 at 03:06 AM.
-
Jul 1st, 2009, 05:06 AM
#7
Re: WPF Forms
Aw I thought for a moment there that JMC had become a WPF user :P
But yeah I wouldn't rely on the Toolbox to provide all of your controls, there are a couple of useful ones that arent in the default toolbox selection.
-
Jul 1st, 2009, 05:24 AM
#8
Re: WPF Forms
 Originally Posted by chris128
Aw I thought for a moment there that JMC had become a WPF user
I intend to fairly soon. I've been concentrating on ASP.NET MVC for a while but WPF is near the top of my list soonta's
 Originally Posted by chris128
But yeah I wouldn't rely on the Toolbox to provide all of your controls, there are a couple of useful ones that arent in the default toolbox selection.
Oddly, I thought to add the ToggleButton to my Toolbox but the only one I could see in the list was an Office Ribbon component. I guess that they don't intend the ToggleButton to be used directly but rather only as a base class. I guess tg's original advice might be what they intend you to do in this case, much as you do in WinForms with the Appearance property, but all the advice I could find on the subject mentioned the ToggleButton. If it works, I'm happy to use it until I have a concrete reason not to.
Last edited by jmcilhinney; Jul 1st, 2009 at 05:29 AM.
-
Jul 1st, 2009, 07:04 AM
#9
Re: WPF Forms
Yeah well it certainly seems to work as you would expect it to so thats what I am going to use when I have need of such a button (although for what I have in mind I think I will need to customise it to work like this one, which is actually more of a combobox but whatever : http://blog.xamltemplates.net/wp-con...obox_style.jpg)
-
Jul 1st, 2009, 01:35 PM
#10
Thread Starter
Hyperactive Member
Re: WPF Forms
Thanks for the help guys I will give it a shot
If I helped you please rate me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|