Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
XamGrid
posted

Hi,

I am using xamGrid i have created column throught ColumnLayoutAssigned  event 

like,

 CellTemp.Append("DataTemplate>");

 CellTemp.Append("xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' ");

 CellTemp.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> ");

 CellTemp.Append("<StackPanel Orientation=\"Vertical\">");

 CellTemp.Append("<StackPanel Orientation=\"Horizontal\">");

 CellTemp.Append(" <Image x:Name=\"imgRestated\" Source=\"../../images/LeftSubMenu_Arrow.png\"></Image>");

 CellTemp.Append(" <TextBlock x:Name=\"txtVal1\"  Width=\"3\" Height=\"1\"/>");

 CellTemp.Append(" <HyperlinkButton x:Name=\"txtValue\" Height=\"12\" Content=\"{Binding SheetName}\" HorizontalAlignment=\"Left\" FontFamily=\"Arial\" FontSize=\"12\" Foreground=\"#0066BE\"  IsTabStop=\"False\"/>");

 CellTemp.Append(" </StackPanel>");

 CellTemp.Append(" </StackPanel>");

 CellTemp.Append(" </DataTemplate>");

 

Naw on in mouseover of cell i want to chane the imgRestated image (Show another image on mouseover).

and cell selected event i want to add one image after txtvalue(HyperlinkButton)

 

please give me the solution.

  • 40030
    Offline posted

    Hi, 

    I apologize i was on vacation. 

    Anyways, really the way you should be doing this is via a ViewModel. Where you have your Image sources bound to properties of your underlying data object. 

    That way, when you detect hover or selection, you would simply update the underlying value of the property on your object, and it will be property updated. 

    -SteveZ

  • 440
    posted

    hi

    can anyone help me?