Benutzer:MovGP0/WPF/Templates

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
   MovGP0        Über mich        Hilfen        Artikel        Weblinks        Literatur        Zitate        Notizen        Programmierung        MSCert        Physik      


<ControlTemplate TargetType="Button">
    <Grid>
        <Rectangle Fill="{TemplateBinding Background}" RadiusX="5" RadiusY="5" />
        <ContentPresenter RecognizesAccessKey="True" 
                  Content="{TemplateBinding Content}" 
                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
</ControlTemplate>

Framework Elements

[Bearbeiten | Quelltext bearbeiten]

Base Elements:

  • Rectangle, Ellipse, Path
  • TextBlock
  • Image, Media

Control class derives from FrameworkElement. Control introduces Template-Property