I have passed the string builder in Automation peer but i need to pass the object. Is it possible?
Please refer my below code for passing the string, i have override the GetItemStatusCore from FrameworkElementAutomationPeer
protected override string GetItemStatusCore()
{
if (this.Owner is VirtualizingCellsControl)
{
var virtualizingCellsControl = this.Owner as VirtualizingCellsControl;
StringBuilder gridrowItems = new StringBuilder();
var dd = virtualizingCellsControl.DataContext;
var fontFamily = virtualizingCellsControl.FontFamily;
var fontSize = virtualizingCellsControl.FontSize;
gridrowItems.Append(string.Format("{0}#", fontFamily));
gridrowItems.Append(string.Format("{0}#", fontSize));
return gridrowItems.ToString();
}
return null;
}
Please refer my below code for passing the string, i have override the GetItemStatusCore from FrameworkElementAutomationPeer
protected override string GetItemStatusCore()
{
if (this.Owner is VirtualizingCellsControl)
{
var virtualizingCellsControl = this.Owner as VirtualizingCellsControl;
StringBuilder gridrowItems = new StringBuilder();
var dd = virtualizingCellsControl.DataContext;
var fontFamily = virtualizingCellsControl.FontFamily;
var fontSize = virtualizingCellsControl.FontSize;
gridrowItems.Append(string.Format("{0}#", fontFamily));
gridrowItems.Append(string.Format("{0}#", fontSize));
return gridrowItems.ToString();
}
return null;
}