Results 1 to 2 of 2

Thread: ComboBox Background?

  1. #1
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 01
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    59,465

    ComboBox Background?

    Ok so Im making my textboxes styled with a nice round shadowed look but when I apply it to the combox they round but dont apply the Background the same.

    Anyone have any good styles or see what Im missing?

    Thanks


    Code:
    <Border 
    	Height="30" 
    	Width="270"
    	BorderBrush="White"
    	HorizontalAlignment="Center"  
    	BorderThickness="2" 
    	CornerRadius="5" 
    	Background="MintCream" 
    	Grid.Row="4" 
    	Grid.Column="1" 
    	Margin="0">
    	<Border.Effect>
    		<DropShadowEffect Opacity="0.2"/>
    	</Border.Effect>
    	<ComboBox 
                     x:Name="cboRole" 
                     Margin="0" 
                     Height="30" 
                     FontSize="12" 
                     Grid.Row="4" 
                     Grid.Column="1" 
                     Background="MintCream"
                     HorizontalAlignment="Stretch" 
                     VerticalAlignment="Center"
                     BorderThickness="0"/>
    </Border>
    Attached Images Attached Images  
    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 (VBA, VB 6, VB.NET, C#)
    Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista (New)Multiple .NET Framework Versions (New)Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007

  2. #2
    Fanatic Member stlaural's Avatar
    Join Date
    Sep 07
    Location
    Quebec, Canada
    Posts
    682

    Re: ComboBox Background?

    I'm no silverlight expert but I remember reading somewhere that the ComboBox has its own style defined that keeps setting the background based on different states (mouseover etc...) and that you needed to define a new style for your combobox in order to achieve that.

    An easy way I guess would be to use Blend, edit a combobox and copy from that.
    Alex
    Sharepoint developer
    "No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)

    Things to consider before posting.
    Don't forget to rate the posts if they helped and mark thread as resolved when they are.


    .Net Regex Syntax (Scripting) | .Net Regex Language Element | .Net Regex Class | DateTime format | Framework 4.0: what's new
    My fresh new blog : writingthecode, even if I don't post much.

    System: Intel i7 920, Kingston SSDNow V100 64gig, HDD WD Caviar Black 1TB, External WD "My Book" 500GB, XFX Radeon 4890 XT 1GB, 12 GBs Tri-Channel RAM, 1x23" and 1x17" LCDs, Windows 7 x64, VS2008/VS2010, Framework 3.5 and 4.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •