Click here to Skip to main content
15,883,705 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: How to access silverlight control properties from aspx page Pin
Ray Cassick13-May-09 2:25
Ray Cassick13-May-09 2:25 
QuestionHow to convert a handle to a wpf window? Pin
Eric Vonjacson5-May-09 0:55
Eric Vonjacson5-May-09 0:55 
AnswerRe: How to convert a handle to a wpf window? Pin
Mark Salsbery5-May-09 5:29
Mark Salsbery5-May-09 5:29 
QuestionWPF RichTextBox - Appending Colored text Pin
Harvey Saayman4-May-09 22:08
Harvey Saayman4-May-09 22:08 
AnswerRe: WPF RichTextBox - Appending Colored text Pin
Philipp Sumi4-May-09 22:13
Philipp Sumi4-May-09 22:13 
GeneralRe: WPF RichTextBox - Appending Colored text Pin
Harvey Saayman4-May-09 23:14
Harvey Saayman4-May-09 23:14 
QuestionWPF(add a message or text in the xmal elements like ellipse at run time in windows application. [modified] Pin
Ch.Gayatri Subudhi4-May-09 18:34
Ch.Gayatri Subudhi4-May-09 18:34 
AnswerRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 20:35
Philipp Sumi4-May-09 20:35 
You're looking at the problem from the wrong end: An ellipse does not have the opportunity to display text, but a Label can take whatever look you want through a control template Smile | :)


<Grid>  
  
  <Grid.Resources>
  
    <Style x:Key="EllipseLabel" TargetType="{x:Type Label}">
    
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type Label}">
            <Grid >
              <Ellipse  Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Stroke="LightPink"
                        StrokeThickness="05"
                        Fill="blue" />
              <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    
    </Style>   
  </Grid.Resources>

  
    <Label Width="200" Height="100" Style="{StaticResource EllipseLabel}" Content="hello world" />
  
</Grid>



...accordingly, if you change your label's content, the text changes.

NetDrives - Open Source Network Share Management

GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:20
Ch.Gayatri Subudhi4-May-09 21:20 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 21:22
Philipp Sumi4-May-09 21:22 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:33
Ch.Gayatri Subudhi4-May-09 21:33 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 21:38
Philipp Sumi4-May-09 21:38 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:42
Ch.Gayatri Subudhi4-May-09 21:42 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 21:46
Philipp Sumi4-May-09 21:46 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:51
Ch.Gayatri Subudhi4-May-09 21:51 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:53
Ch.Gayatri Subudhi4-May-09 21:53 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 22:02
Ch.Gayatri Subudhi4-May-09 22:02 
GeneralSir i got anothr solution regarding this... Pin
Ch.Gayatri Subudhi5-May-09 20:25
Ch.Gayatri Subudhi5-May-09 20:25 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi5-May-09 1:13
Ch.Gayatri Subudhi5-May-09 1:13 
QuestionUserControl Databinding Pin
mikla5213-May-09 3:14
mikla5213-May-09 3:14 
AnswerRe: UserControl Databinding Pin
Mark Salsbery3-May-09 8:31
Mark Salsbery3-May-09 8:31 
GeneralRe: UserControl Databinding Pin
mikla5213-May-09 9:08
mikla5213-May-09 9:08 
GeneralRe: UserControl Databinding Pin
Mark Salsbery3-May-09 9:40
Mark Salsbery3-May-09 9:40 
GeneralRe: UserControl Databinding Pin
mikla5213-May-09 10:25
mikla5213-May-09 10:25 
GeneralRe: UserControl Databinding Pin
mikla5213-May-09 21:04
mikla5213-May-09 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.