Jump to content

change the color of ellipse in wpf

- - - - -

  • Please log in to reply
2 replies to this topic

#1
dilip11

dilip11

    Newbie

  • Members
  • Pip
  • 2 posts
hello i m new in wpf

i have 1 ellipse...
and 1 combo box
in combo box i have all the color name..

i want to change the color of ellipse by selecting color name by combo box at run time ...

but in winow1.xaml.cs file i not able to find my ellipse...

...........

so how i can bound my ellipse fill property with combox selectedtext... in xaml...

Plse Help me


Thnks......

#2
digioz

digioz

    Newbie

  • Members
  • Pip
  • 8 posts
It would be a lot easier if you could post the code you have so far.

#3
dilip11

dilip11

    Newbie

  • Members
  • Pip
  • 2 posts

digioz said:

It would be a lot easier if you could post the code you have so far.

This Is My Ellipse---->>>

 <Ellipse Name="Elips1"  VerticalAlignment="Center" HorizontalAlignment="Center" Width="280" Height="280" Fill="Coral" StrokeThickness="3" Opacity="22" OpacityMask="Blue">

                                        <Ellipse.BitmapEffect>

                                            <DropShadowBitmapEffect Color="DarkGoldenrod" Opacity="1" ShadowDepth="10" />

                                        </Ellipse.BitmapEffect>

                                        <Ellipse.Stroke>

                                        <LinearGradientBrush>

                                            <LinearGradientBrush.GradientStops>

                                                <GradientStop Color="DarkBlue" Offset="0" />

                                                <GradientStop Color="LightBlue" Offset="1" />

                                            </LinearGradientBrush.GradientStops>

                                        </LinearGradientBrush>

                                    </Ellipse.Stroke>

                                </Ellipse>


This is my Combo Box--->>>

   <ComboBox Height="22" Margin="0,11,28,0" Name="comboBox2" VerticalAlignment="Top" SelectionChanged="comboBox2_SelectionChanged" HorizontalAlignment="Right" Width="96" SelectedIndex="0"></ComboBox>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users