-
Oct 14th, 2009, 02:24 AM
#1
[RESOLVED] Rounded Combobox
Why does the dropdown arrow disappears when I try to use the following code? Is there any other method which I can round out the corners of the combobox? Thanks!
Code:
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
<Grid>
<Border x:Name="border" Background="White" BorderBrush="#FFFFC934" BorderThickness="2" CornerRadius="10,10,10,10" Width="Auto" Height="Auto">
</Border>
</Grid>
</ControlTemplate>
-
Oct 14th, 2009, 08:12 AM
#2
Re: Rounded Combobox
I'm no expert on control templates but I think when you define a control template you are defining the entire control. So the combobox that you apply that template to will be JUST that border that you have defined and nothing else - hence the drop down arrow disappearing.
From what I remember, you can assign special names to "parts" of your control template and then WPF will treat them in the same way as their standard control counterpart. For example the little dropdown arrow might be named PART_DropDown in the standard combobox control template, so if you define something in your template and name it that same name then WPF will make it do the same things as the normal one would do (but without the same visual effects obviously as thats for you to define). I'm not sure whether the little arrow in a combobox is actually a separate part though, but you can find out by using Expression Blend to edit a copy of the combobox control template and examining the 'internals' of it.
Sorry if any of the above is not 100% correct but its been a while since I did anything like that. Have a look on the web for Control Template tutorials
-
Oct 15th, 2009, 02:11 AM
#3
-
Oct 15th, 2009, 04:39 AM
#4
Re: [RESOLVED] Rounded Combobox
Nice
-
Oct 15th, 2009, 11:54 PM
#5
Re: [RESOLVED] Rounded Combobox
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 17th, 2011, 01:21 AM
#6
New Member
Re: [RESOLVED] Rounded Combobox
Hi dee-u,
Attached project that helps a lot for the rounded combobox
Do you have all other controls template
if yes please attach only the control templates..i just wanted to explore all this
Thanks
decuser.
-
Apr 18th, 2011, 01:33 AM
#7
Re: [RESOLVED] Rounded Combobox
Originally Posted by decuser
Hi dee-u,
Attached project that helps a lot for the rounded combobox
Do you have all other controls template
if yes please attach only the control templates..i just wanted to explore all this
Thanks
decuser.
You can try searching them in MSDN.
-
Apr 18th, 2011, 01:55 AM
#8
New Member
Re: [RESOLVED] Rounded Combobox
Hi,
I am interested in control templates of the control available in the NetVerse screen.I searched MSDN couldn;t get the ones i wanted.
I saw your netverse screen and with you sample project i could see only combobox template not the other ones..i just need the button,textbox templates as available in the screen
kindly help me
thanks
decuser
-
Apr 19th, 2011, 12:24 PM
#9
Re: [RESOLVED] Rounded Combobox
All the rounded control templates are in the netverser project. This one is just for hte rounded combobox
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 19th, 2011, 12:34 PM
#10
Re: [RESOLVED] Rounded Combobox
Here is the link to the project in CodeBank
http://www.vbforums.com/showthread.p...18#post3631718
Check out the NetVerserStyles.xaml file
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Mar 4th, 2013, 10:23 AM
#11
New Member
Re: [RESOLVED] Rounded Combobox
Great example! I have one question: how is the gradient around the combobox controlled? I've set almost every color to #FFF and nothing seems to change it. Thanks for any help you can offer.
-
Aug 18th, 2015, 06:03 AM
#12
Registered User
Re: [RESOLVED] Rounded Combobox
can't find attachment WpfApplication1.zip . Please upload again....
-
Aug 18th, 2015, 11:29 AM
#13
Re: [RESOLVED] Rounded Combobox
Originally Posted by makanimanthan
can't find attachment WpfApplication1.zip . Please upload again....
Its in post #3
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
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
|