Click here to Skip to main content
15,902,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
any one now how make a style to grid , canvas, dockpanel.. any other container control,
add a style to make them rounded by style,
any help for this? or this can not be made?

thx for all your helps.
Posted
Comments
Varun Sareen 7-Feb-12 3:28am    
Dear Friend,

Use javascript.

--Varun

You can put a border around.
XML
<Border BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
   <Grid/>
</Border>
 
Share this answer
 
There is a much simper solution.
You don't need anything but Border:

XML
<border borderthickness="1.2 1.2 0 0" cornerradius="3.2" borderbrush="Black" removed="Yellow" height="20" margin="6">
  <border borderthickness="0 0 1.2 1.2" cornerradius="3.2" borderbrush="White">
    <combobox>
      <comboboxitem>
         <textblock removed="Red">Red</textblock>
      </comboboxitem>
      <comboboxitem>
         <textblock removed="Yellow">Yellow</textblock>
      </comboboxitem>
      <comboboxitem>
         <textblock removed="AliceBlue">Alice Blue</textblock>
      </comboboxitem>
    </combobox>
  </border>
</border>


This code sample demonstrates more advanced style: recessed or elevated rounded border around some element.

—SA
This sample shows how to make
 
Share this answer
 
thx guys i now this method but i want to do it with style , to re-use it in many controls, the second idea is that i want this border to a container like grid or canvas or dock panel or any other container control.

thx for you help again
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900