public override void OnApplyTemplate() { base.OnApplyTemplate(); border = this.GetTemplateChild("border") as Border; border.MouseEnter += border_MouseEnter; border.MouseLeave += border_MouseLeave; btnDownLoad = this.GetTemplateChild("btnDownLoad") as MDFButton; btnBuy = this.GetTemplateChild("btnBuy") as MDFButton; img = this.GetTemplateChild("img") as Image; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); if (DesignerProperties.IsInDesignTool) { return; } btnUpload = this.GetTemplateChild("btnUpload") as MDFButton; lblText = this.GetTemplateChild("lblText") as TextBlock; lblPrecentage = this.GetTemplateChild("lblPrecentage") as TextBlock; rect = this.GetTemplateChild("rect") as Rectangle; btnUpload.Click += btnUpload_Click; var sourceUrl = WebHelp.WebUrl; serviceUrl = sourceUrl + "/SLUpload/FileReceive.ashx"; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); if (DesignerProperties.IsInDesignTool) { return; } img = this.GetTemplateChild("img") as Image; popup = this.GetTemplateChild("popup") as Popup; btnYes = this.GetTemplateChild("btnYes") as HyperlinkButton; if (btnYes != null) { btnYes.Click += btnYes_Click; } btn = this.GetTemplateChild("btn") as MDFButton; if (ButtonStyle != null) { btn.Style = ButtonStyle; } else { this.btn.Width = ButtonWidth; this.btn.Height = ButtonHeight; } if (this.Content != null) { btn.Content = Content; } if (this.ButtonMargin != null) { btn.Margin = ButtonMargin; } }