🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #21086

[C# Silverlight] szablony

#21086
From: Mariusz S.
Date: Sat, 03 Oct 2009 15:24
33 lines
1730 bytes
Witam

mam pytanie odnośnie technologi Silverlight i C#.

W jaki sposób odwołać się do właściwości szablonu z poziomu C#?

Szablon:
     <Application.Resources>
         <Style x:Key="ButtonWithTemplate" TargetType="Button">
             <Setter Property="Template">
                 <Setter.Value>
                     <ControlTemplate TargetType="Button">
                         <Grid>
				<Ellipse Width="{TemplateBinding Width}"
                           Height="{TemplateBinding Height}"></Ellipse>
                         </Grid>
                     </ControlTemplate>
                 </Setter.Value>
             </Setter>
         </Style>
     </Application.Resources>
</Application>

Kontrolka:
<Button Name="butShow" Style="{StaticResource ButtonWithTemplate}" 
Click="Button_Click"/>

Usiłuję odwołać się z kontrolki "Button" do właściwości kontrolki 
"Ellipse" która znajduje się w szablonie "ButtonWithTemplate"

--
Pozdrawiam
Mariusz
Technical Details
Message-ID: <ha7qap$rk7$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail
From: "Mariusz S." <seraf1@poczta.onet.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: [C# Silverlight] szablony
Date: Sat, 03 Oct 2009 17:24:08 +0200
Organization: http://onet.pl
Lines: 33
Message-ID: <ha7qap$rk7$1@news.onet.pl>
NNTP-Posting-Host: 143-pra-18.acn.waw.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1254583449 28295 82.210.153.143 (3 Oct 2009 15:24:09 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Sat, 3 Oct 2009 15:24:09 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit