I am new to this, and sort of self teaching - I am trying to do the following: a) drag and drop a file into a window b) extract the icon from this file c) display filename in one window, and display the associated icon in another window.
I got the icon to extract in one program, and I have the file dragging and dropping to display filename.... NOW, I am trying to combine the two!
Say, can you zip up and post a small sample project?
It would make it easier for folks to just load up the project and check things out, rather than trying to spot the error looking through the code posted here.
Binding errors will show up in the Output window while you are debugging the program from within the IDE.
System.Windows.Data Error: 40 : BindingExpression path error: 'FileIcon' property not found on 'object' ''TextBlock' (Name='txtFileIcon')'. BindingExpression:Path=FileIcon; DataItem='TextBlock' (Name='txtFileIcon'); target element is 'Image' (Name=''); target property is 'Source' (type 'ImageSource')
System.Windows.Data Error: 40 : BindingExpression path error: 'FileName' property not found on 'object' ''TextBlock' (Name='txtFileIcon')'. BindingExpression:Path=FileName; DataItem='TextBlock' (Name='txtFileIcon'); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=FileIcon'. BindingExpression:Path=MyFiles; DataItem=null; target element is 'ListBox' (Name='FileIconArea'); target property is 'ItemsSource' (type 'IEnumerable')
The thread '<No Name>' (0xf54) has exited with code 0 (0x0).
Hi lynnosler, how did you fix that ? I am too facing the same problem.
System.Windows.Data Error: 40 : BindingExpression path error: 'AutomationId' property not found on 'object' ''DiagnosticsHierarchyView' (Name='_diagnosticsHierarchyViewControl')'. BindingExpression:Path=AutomationId; DataItem='DiagnosticsHierarchyView' (Name='_diagnosticsHierarchyViewControl'); target element is 'TabItem' (Name=''); target property is 'AutomationId' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'AutomationId' property not found on 'object' ''DiagnosticsHierarchyView' (Name='_diagnosticsHierarchyViewControl')'. BindingExpression:Path=AutomationId; DataItem='DiagnosticsHierarchyView' (Name='_diagnosticsHierarchyViewControl'); target element is 'TabItem' (Name=''); target property is 'AutomationId' (type 'String')
//Basket class
public class Basket
{
//Private fields
private readonly BindingList<Order> _orders = new BindingList<Order>();
//Public properties
public IList<Order> Orders
{
get { return _orders; }
}
}
//Initialize the grid
public void InitializeGrid(Grid grid, IList<Basket> baskets)
{
//Bind the grid to a basket collection
grid.DataSource = baskets;
//Add orders to each basket row
foreach(Basket basket in baskets)
{
Row row = grid.DataObjects.FindFirstRow(basket);
if(row != null)
{
foreach(Order order in basket.Orders)
{
row.Add(order);
}
}
}
//Add some other data object on the topmost hierarchical level
grid.Rows.Add(new SomeOtherData());
}
you can bind one or multiple data sources with Grid.DataSource property with simultaneous adding of objects with Grid.Rows.Add() / Row.Add() methods. more here http://www.******.com/en/net-suite/n...adding-objects
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.