PowerBuilder Forum

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: How to set template on Groupbox I creating in Code behind


Newbie

Status: Offline
Posts: 1
Date:
How to set template on Groupbox I creating in Code behind


I have create control template in xaml:

   <ControlTemplate x:Name="temp" x:Key="GBTemplate" TargetType="GroupBox">

at code behind, I have create new Groupbox:

GroupBox gb1
gb1=create GroupBox

my issue now, I can not apply template on my groupbox in code behind. I am try to use these 2 methods
1. gb1.SetResourceReference(templateProperty, "GBTemplate")
2. gb1.Template=Resources["GBTemplate"] as ControlTemplate;

but groupbox does not detect SetResourceReference and Template controls.

I also try another method by create external dll by using C# in visual studio but my problem is I do not know how to call my control template from PB.net.

anyone one have an idea?



__________________
Page 1 of 1  sorted by
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard