Silverlight Show Forum Controls Threads http://www.silverlightshow.net/controls.aspx Silverlight Show Forum Controls Threads http://backend.userland.com/rss TreeView as Organizational Chart <p>Hi,</p> <p>I want to create an organizational chart with lines connection Parent with its children using Silverlight 4 TreeView control. The creation of nodes will be dynamic. Please provide me some solution or any approach!!</p> http://www.silverlightshow.net/Forums/controls/treeview-as-organizational-chart.aspx manishagarwal 7/6/2011 9:02:53 AM How to Load image in Imagebox on click event of the button after browsing <p>Hi,</p> <p>My application is in Silverlight,coded in C#.Net in VS2010.</p> <p>I have a form with a Imagebox and a Browse button below it.</p> <p>My requirement is when the user clicks on Browse button OpenDialog should be opened and the User should be able to click and select an Image file and when the User selects an Image file than that selected Image should be loaded to the Imagebox.</p> <p>I have written some code but just facing the problem of Providing the Source to Imagebox.</p> <p>Below is my Code</p> <div class="reCodeBlock" style="border:1px solid #7f9db9;overflow-y: auto;"> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">01.</code><span style="margin-left: 0px !important;"><code style="color: #000000;">OpenFileDialog imageDialog = new OpenFileDialog();</code></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">02.</code><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">03.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">//Filter default filetype to be allowed for selection </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">04.</code><span><code>          </code><span style="margin-left: 30px !important;"><code style="color: #000000;">.Filter = "Pictures (*.jpg)|*.jpg";</code></span></span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">05.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">imageDialog.FilterIndex = 1;</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">06.</code><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">07.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">//Allows multiple files to be selected </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">08.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">imageDialog.Multiselect = true;</code></span></span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">09.</code><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">10.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">//Call the ShowDialog method to show the dialog box </code></span></span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">11.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">bool? userClickedOK = imageDialog.ShowDialog();</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">12.</code><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">13.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">//Process input if the user clicked OK </code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">14.</code><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">15.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">if (userClickedOK == true)</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">16.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">{</code></span></span></div> <div style="background-color: #ffffff;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">17.</code><span><code>             </code><span style="margin-left: 39px !important;"><code style="color: #000000;">image1.Source =</code></span></span></div> <div style="background-color: #f8f8f8;"><code style="color: #5c5c5c; float: left; width: 3em; padding-right: 0.3em; text-align: right; display: block;">18.</code><span><code>           </code><span style="margin-left: 33px !important;"><code style="color: #000000;">}</code></span></span></div> </div> Please help in the above Code <p><br /> </p> <p><br /> </p> http://www.silverlightshow.net/Forums/controls/how-to-load-image-in-imagebox-on-click-event-of-the-button-after-browsing.aspx EhteshamSiddiqui 8/23/2011 1:06:59 PM dependency property. <span style="color: #898989; font-family: 'segoe ui', tahoma, arial, helvetica, sans-serif; font-size: 10px; line-height: 10px;">   </span><span style="font-family: 'segoe ui', tahoma, arial, helvetica, sans-serif;"> <h1 class="titleHeader" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 2.154em !important; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #363636; line-height: 1; position: relative; z-index: 1; font-family: 'segoe ui', tahoma, arial, helvetica, sans-serif;"><span style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: #898989; font-weight: normal; font-family: verdana, helvetica, sans-serif; font-size: 12px; background-color: #f0f0f0;">I am try to use a datagrid on a user control an expose the itemsource property via a dependency property.   </span></h1> <div class="qBody" style="border:0px;color: #44525e; line-height: 18px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent;"> <div style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent;"><span class="pBody postableBody" style="border-style: initial; border-color: initial; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent;border-width: 0px;">I am using Silverlight 4<br /> <br /> <br /> </span> <h2 class="subtitle" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 1.538em; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #000000; line-height: 1;">View Model</h2> <span class="pBody postableBody" style="border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 13px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent;border-width: 0px;"><br /> Imports System.ServiceModel.Domain<wbr></wbr>Services.C<wbr></wbr>lient<br /> Imports System.Collections.ObjectM<wbr></wbr>odel<br /> Imports GalaSoft.MvvmLight<br /> Imports GalaSoft.MvvmLight.Command<wbr></wbr><br /> Imports GalaSoft.MvvmLight.Messagi<wbr></wbr>ng<br /> <br /> <br /> Public Class TimeSheetsViewModel<br />     Inherits ViewmodelBase<br /> <br />     Private WithEvents ctx As TimeSheetServiceContext = OPDomainContext.OPDomainCo<wbr></wbr>ntextInsta<wbr></wbr>nce<br /> <br /> #Region "Properties"<br /> <br />     Private M_monday As New ObservableCollection(Of TIMESHEET)<br />     Public Property Monday As ObservableCollection(Of TIMESHEET)<br />         Get<br />             Return M_monday<br />         End Get<br />         Set(value As ObservableCollection(Of TIMESHEET))<br />             Me.M_monday = value<br />             RaisePropertyChanged("Mond<wbr></wbr>ay")<br />         End Set<br />     End Property<br />     Public Property MondayLoading As Boolean = True<br />  <br /> #End Region<br /> <br /> #Region "Constructors"<br />     Public Sub New()<br />         ctx.Load(Of TIMESHEET)(ctx.GetTimeShee<wbr></wbr>tsMondayQu<wbr></wbr>ery(), AddressOf MondayLoaded, Nothing)<br />     End Sub<br /> #End Region<br /> <br /> #Region "Private Methdods"<br />     Private Sub MondayLoaded(args As Loadoperation)<br />         Try<br />             Dim _TimeSheets As New ObservableCollection(Of TIMESHEET)<br /> <br />             For Each Timesheet As TIMESHEET In args.Entities<br />                 _TimeSheets.Add(Timesheet)<wbr></wbr><br />             Next<br /> <br />             Me.M_monday = _TimeSheets<br />       <br />             MondayLoading = False<br />         Catch ex As Exception<br />             ErrorWindow.CreateNew(ex.M<wbr></wbr>essage)<br />         End Try<br />     End Sub  <br /> #End Region<br /> End Class<br /> <br /> <br /> <br /> <h2 class="subtitle" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 1.538em; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #000000; line-height: 1;">User Control</h2> <br /> <br /> Partial Public Class Ctrl_TimeSheetDataGrid<br />     Inherits UserControl<br /> <br />     Public Sub New()<br />         InitializeComponent()<br />     End Sub<br /> <br />     Public Property TimeSheetItemsSource() As ObservableCollection(Of TIMESHEET)<br />         Get<br />             Return DirectCast(GetValue(ItemsS<wbr></wbr>ourcePrope<wbr></wbr>rty), ObservableCollection(Of TIMESHEET))<br />         End Get<br />         Set(value As ObservableCollection(Of TIMESHEET))<br />             SetValue(ItemsSourceProper<wbr></wbr>ty, value)<br />         End Set<br />     End Property<br /> <br />     Dim ItemsSourceProperty As DependencyProperty = DependencyProperty.Registe<wbr></wbr>r("TimeShe<wbr></wbr>etItemsSou<wbr></wbr>rce", GetType(ObservableCollecti<wbr></wbr>on(Of TIMESHEET)), GetType(Ctrl_TimeSheetData<wbr></wbr>Grid), New PropertyMetadata(New PropertyChangedCallback(Ad<wbr></wbr>dressOf onItemsSourcePropertyChang<wbr></wbr>ed)))<br /> <br />     Private Sub onItemsSourcePropertyChang<wbr></wbr>ed(sender As Object, dp As DependencyPropertyChangedE<wbr></wbr>ventArgs)<br />         Me.dgMonday.ItemsSource = dp.NewValue<br />     End Sub<br /> End Class<br /> <br /> <br /> <h2 class="subtitle" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 1.538em; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #000000; line-height: 1;">Using the user control</h2> <br /> <ds:Ctrl_TimeSheetDataGrid<wbr></wbr> x:Name="dgMonday"  TimeSheetItemsSource="{Bin<wbr></wbr>ding Monday}"/></span></div> </div> </span> http://www.silverlightshow.net/Forums/controls/dependency-property.aspx KevinRobinson 9/6/2011 4:03:36 PM MaskedTextBox Control <p>Hi everyone,</p> <p> I want to create a MaskedTextBox control, but not sure about the approach to follow. Could anyone please help me understanding its requirement and functionlity...like how should i start working on this control. how does it work....</p> <p> Please help me friends!!!</p> http://www.silverlightshow.net/Forums/controls/maskedtextbox-control.aspx manishagarwal 10/28/2011 6:48:31 PM modify/Update the UI in silverligt <p>Hi,</p> <p>I am new to the Silverlight concept & still learning it. I have a question. </p> <p>In ASP.NET, we had practice to have the UI in the ASPX page & the code behind moved to dll. I mean the business logic for the UI was from a class library & only the UI to be in ASPX pages. When the application is shipped to customers, they had the ASPX pages & the dependent assemblies & the CSS. Customers had options to modify content of the ASPX page like any button alignment/increasing the width/height   of any controls in that ASPX pages if required. Also change the CSS. So how can we achieve the same in Silverlight?</p> <p>Thanks,</p> <p>Mallikarjun</p> http://www.silverlightshow.net/Forums/controls/modify-update-the-ui-in-silverligt.aspx Mallikarjun06 12/5/2011 9:35:22 AM URGENT! Bookshelf silverlight control <p>Hi, </p> <p>I am a beginner in silverlight. I have just installed silverlight 5. I wanted to utilise the bookshelf silverlight control but when i open it with my visual studio, it says that two of the files are not downloaded properly. So, i downloaded several times but still the same outcome. I would like to know why and help me solve this problem. This silverlight bookshelf control is downloaded from <a href="http://classifiedcabinet.codeplex.com/">http://classifiedcabinet.codeplex.com/</a> . I went to the "sample" section of the particular page that you are navigated to when click on the above link and download the source. </p> <p>with regards</p> http://www.silverlightshow.net/Forums/controls/urgent--bookshelf-silverlight-control.aspx spleenie 1/8/2012 4:48:49 PM silverlight control <p>Hi, </p> <p>I am a beginner in silverlight.There are some problems with the file when i open it with visual studio but i am confuse about it. </p> <p>It is as follows:</p> <p>Error 10 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Samples.Bookshelf.Admin' that is not included in the assembly. </p> <p>Error 11 The type 'local:ViewModelLocator' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. </p> <p>Warning 2 The referenced component 'Microsoft.Expression.Interactions' could not be found.  </p> <p>Warning 3 The referenced component 'System.Windows.Controls.Data.DataForm.Toolkit' could not be found.  </p> <p>Warning 4 The referenced component 'System.Windows.Controls.Data.Toolkit' could not be found.  </p> <p>Warning 5 The referenced component 'System.Windows.Controls.DataVisualization.Toolkit' could not be found.  </p> <p>Warning 6 The referenced component 'System.Windows.Controls.Input.Toolkit' could not be found.  </p> <p>Warning 7 The referenced component 'System.Windows.Controls.Layout.Toolkit' could not be found.  </p> <p>Warning 1 The referenced component 'System.Windows.Controls.Toolkit' could not be found.  </p> <p>Warning 8 The referenced component 'System.Windows.Controls.Toolkit' could not be found.  </p> <p>Warning 9 The referenced component 'System.Windows.Interactivity' could not be found.  </p> <p> </p> <p>Does it mean that i have to download something that is not downloaded previously?</p> http://www.silverlightshow.net/Forums/controls/silverlight-control.aspx spleenie 1/14/2012 5:00:11 PM Silverlight 5: Changing a ControlTemplate Property dynamically <p>Hello everybody,</p> <p>I have a little problem, which keeps me going nuts now for two days. I am a XAML Rookie, but I have 5 years experience with WinForms & Co. Maybe I don't need a very deep explanation, maybe just a good example or hint would help me, but I am now at a point where I know, I need some help. </p> <p>Ok. Here is the deal:</p> <p>I have a ControlTemplate that I use for buttons. This Template has two images. The super simple thing I want to do is, to change the source of the images for every button instance in the XAML Code. The goal is simple: The whole bevavior for every button is the same, the images are different. </p> <p>This is how I use the template in XAML:</p> <p><code> <span class="xmltag"></span></code></p> <div style="border: 1px solid #7f9db9; overflow-y: auto;" class="reCodeBlock"> <div style="background-color: #ffffff;"><span style="margin-left: 0px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Button</code> <code style="color: #808080;">Template</code><code style="color: #000000;">=</code><code style="color: blue;">"{StaticResource PictureButtonTemplate}"</code> <code style="color: #808080;">Grid.Row</code><code style="color: #000000;">=</code><code style="color: blue;">"1"</code> <code style="color: #808080;">Height</code><code style="color: #000000;">=</code><code style="color: blue;">"48"</code> <code style="color: #808080;">HorizontalAlignment</code><code style="color: #000000;">=</code><code style="color: blue;">"Left"</code> <code style="color: #808080;">Margin</code><code style="color: #000000;">=</code><code style="color: blue;">"108,21,0,0"</code> <code style="color: #808080;">Name</code><code style="color: #000000;">=</code><code style="color: blue;">"button2"</code> <code style="color: #808080;">VerticalAlignment</code><code style="color: #000000;">=</code><code style="color: blue;">"Top"</code> <code style="color: #808080;">Width</code><code style="color: #000000;">=</code><code style="color: blue;">"48"</code> <code style="color: #808080;">Background</code><code style="color: #000000;">=</code><code style="color: blue;">"Black"</code><code style="color: #000000;">></</code><code style="color: #006699; font-weight: bold;">Button</code><code style="color: #000000;">></code></span></div> </div> <p>And this is the ControlTemplate itself:</p> <div style="border: 1px solid #7f9db9; overflow-y: auto;" class="reCodeBlock"> <div style="background-color: #ffffff;"><span style="margin-left: 0px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">ControlTemplate</code> <code style="color: #808080;">x:Key</code><code style="color: #000000;">=</code><code style="color: blue;">"PictureButtonTemplate"</code> <code style="color: #808080;">TargetType</code><code style="color: #000000;">=</code><code style="color: blue;">"Button"</code><code style="color: #000000;">></code></span></div> <div style="background-color: #f8f8f8;"><span><code>        </code><span style="margin-left: 24px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Grid</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>            </code><span style="margin-left: 36px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">VisualStateManager.VisualStateGroups</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                </code><span style="margin-left: 48px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">VisualStateGroup</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"CommonStates"</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">VisualState</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"Disabled"</code><code style="color: #000000;">/></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                    </code><span style="margin-left: 60px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">VisualState</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"Normal"</code><code style="color: #000000;">/></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">VisualState</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"Pressed"</code><code style="color: #000000;">/></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                    </code><span style="margin-left: 60px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">VisualState</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"MouseOver"</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                        </code><span style="margin-left: 72px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Storyboard</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                            </code><span style="margin-left: 84px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">ObjectAnimationUsingKeyFrames</code> <code style="color: #808080;">Storyboard.TargetProperty</code><code style="color: #000000;">=</code><code style="color: blue;">"(UIElement.Visibility)"</code> <code style="color: #808080;">Storyboard.TargetName</code><code style="color: #000000;">=</code><code style="color: blue;">"mouseOverImage"</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                </code><span style="margin-left: 96px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame</code> <code style="color: #808080;">KeyTime</code><code style="color: #000000;">=</code><code style="color: blue;">"0"</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                    </code><span style="margin-left: 108px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame.Value</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                        </code><span style="margin-left: 120px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Visibility</code><code style="color: #000000;">>Visible</</code><code style="color: #006699; font-weight: bold;">Visibility</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                    </code><span style="margin-left: 108px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame.Value</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                </code><span style="margin-left: 96px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                            </code><span style="margin-left: 84px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">ObjectAnimationUsingKeyFrames</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                            </code><span style="margin-left: 84px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">ObjectAnimationUsingKeyFrames</code> <code style="color: #808080;">Storyboard.TargetProperty</code><code style="color: #000000;">=</code><code style="color: blue;">"(UIElement.Visibility)"</code> <code style="color: #808080;">Storyboard.TargetName</code><code style="color: #000000;">=</code><code style="color: blue;">"normalImage"</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                </code><span style="margin-left: 96px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame</code> <code style="color: #808080;">KeyTime</code><code style="color: #000000;">=</code><code style="color: blue;">"0"</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                    </code><span style="margin-left: 108px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame.Value</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                        </code><span style="margin-left: 120px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Visibility</code><code style="color: #000000;">>Collapsed</</code><code style="color: #006699; font-weight: bold;">Visibility</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                    </code><span style="margin-left: 108px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame.Value</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                </code><span style="margin-left: 96px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">DiscreteObjectKeyFrame</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                            </code><span style="margin-left: 84px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">ObjectAnimationUsingKeyFrames</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                        </code><span style="margin-left: 72px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">Storyboard</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">VisualState</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                </code><span style="margin-left: 48px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">VisualStateGroup</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #ffffff;"><span><code>            </code><span style="margin-left: 36px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">VisualStateManager.VisualStateGroups</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>            </code><span style="margin-left: 36px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Image</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"normalImage"</code> <code style="color: #808080;">Source</code><code style="color: #000000;">=</code><code style="color: blue;">"Grafiken/Icons/48x48/Man.png"</code>           <code style="color: #808080;">Margin</code><code style="color: #000000;">=</code><code style="color: blue;">"0"</code> <code style="color: #808080;">Stretch</code><code style="color: #000000;">=</code><code style="color: blue;">"Fill"</code> <code style="color: #808080;">HorizontalAlignment</code><code style="color: #000000;">=</code><code style="color: blue;">"Center"</code> <code style="color: #808080;">VerticalAlignment</code><code style="color: #000000;">=</code><code style="color: blue;">"Center"</code> <code style="color: #808080;">Width</code><code style="color: #000000;">=</code><code style="color: blue;">"Auto"</code><code style="color: #000000;">/></code></span></span></div> <div style="background-color: #ffffff;"><span><code>            </code><span style="margin-left: 36px ! important;"><code style="color: #000000;"><</code><code style="color: #006699; font-weight: bold;">Image</code> <code style="color: #808080;">x:Name</code><code style="color: #000000;">=</code><code style="color: blue;">"mouseOverImage"</code> <code style="color: #808080;">Source</code><code style="color: #000000;">=</code><code style="color: blue;">"Grafiken/Icons/48x48/eraser_fav_48.png"</code> <code style="color: #808080;">Margin</code><code style="color: #000000;">=</code><code style="color: blue;">"0"</code> <code style="color: #808080;">Stretch</code><code style="color: #000000;">=</code><code style="color: blue;">"Fill"</code> <code style="color: #808080;">Visibility</code><code style="color: #000000;">=</code><code style="color: blue;">"Collapsed"</code>       <code style="color: #808080;">HorizontalAlignment</code><code style="color: #000000;">=</code><code style="color: blue;">"Center"</code> <code style="color: #808080;">VerticalAlignment</code><code style="color: #000000;">=</code><code style="color: blue;">"Center"</code> <code style="color: #808080;">Width</code><code style="color: #000000;">=</code><code style="color: blue;">"Auto"</code><code style="color: #000000;">/> </</code><code style="color: #006699; font-weight: bold;">Grid</code><code style="color: #000000;">></code></span></span></div> <div style="background-color: #f8f8f8;"><span><code> </code><span style="margin-left: 3px ! important;"><code style="color: #000000;"></</code><code style="color: #006699; font-weight: bold;">ControlTemplate</code><code style="color: #000000;">></code></span></span></div> </div> <p>In the control template, you can see two images. I just want to change these images dynamically in XAML. </p> <p><strong>How can I do this?</strong></p> <p> BTW: I also have implemented a code behind file for this ControlTemplate. So everything is possible, I just need a hint.....</p> <p>Thank you.</p> <p>Michael, Hamburg. </p> <p> </p> <p> </p> <p></p> <p> </p> <p></p> <p></p> <p></p> <p></p> http://www.silverlightshow.net/Forums/controls/silverlight-5--changing-a-controltemplate-property-dynamically.aspx mk222 2/10/2012 12:53:42 AM HTML Editor for Silverlight <p>Hi Developers,</p> <p>I am looking for HTML Editor like CKEditor << http://ckeditor.com/demo >> in Silverlight, I browsed a lot and found nothing good like this... I had visited Silverlight HTML Editor but its not so good to be used for a product.</p> <p>Is there any html editor can be used in Silverlight  (Opensource or which is available in toolkit).</p> <p>Please suggest me, i want to use it for a product which based on HTML Editor basically.</p> http://www.silverlightshow.net/Forums/controls/html-editor-for-silverlight.aspx sm1 2/20/2012 8:13:14 PM BIND to individual control in custom control(group of buttons) <p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-family: calibri;">I want to standardize a group of buttons to be able to drag & drop them on any page. The consumer of control should be able to BIND to individual control in the group. The consumer of button should not be able to change its appearance.</span></p> http://www.silverlightshow.net/Forums/controls/bind-to-individual-control-in-custom-control-group-of-buttons.aspx s_sonal 5/3/2012 8:02:04 PM How to print multiple page in silverlight? Hi,<br /> I am working in silverlight and i have one Grid with many Rows.<br /> In My Grid Row there are many control for display purpose.<br /> Now i want to print this Grid with all row.<br /> I found many solution for PrintDocument in Silverlight but it print only first page multiple time.<br />  <br /> My code is like,<br /> <div class="pre-action-link" id="premain0" width="100%" style="display: block;"> <a href="http://www.codeproject.com/Questions/436516/How-to-print-multiple-page-in-silverlight#"></a></div> <pre id="pre0" style="margin-top: 0px;"><span class="code-keyword">void</span> btnPrint_Click(<span class="code-keyword">object</span> sender, RoutedEventArgs e) { PrintDocument pd = <span class="code-keyword">new</span> PrintDocument(); pd.PrintPage += <span class="code-keyword">new</span> EventHandler<PrintPageEventArgs>(pd_PrintPage); pages.Add(grdMain); pd.Print(<span class="code-string">"</span><span class="code-string">Title1"</span>); }   <span class="code-keyword">void</span> pd_PrintPage(<span class="code-keyword">object</span> sender, PrintPageEventArgs e) { e.PageVisual = grdMain; e.HasMorePages = <span class="code-keyword">true</span>; }   </pre>  <br /> When i add e.HasMorePages = true that time it will going to infinite loop and does not print.<br />  <br /> Please help me... http://www.silverlightshow.net/Forums/controls/how-to-print-multiple-page-in-silverlight.aspx savalia_manoj 8/8/2012 8:40:19 AM