<k:GridView Name="_masterGridView"
ItemsSource="{Binding ProductLocationList}"
SelectedItem="{Binding ProductLocationSelected}">
<!-- DataContext does not propagate here automatically in user control... why? -->
<k:GridView.ExportOptions>
<k:GridViewExportOptions Title="Production Location Management">
<k:SearchCriteria >
<k:SearchCriterion Title="End Date"
Value="{Binding SearchEndDate}"
ValueFormat="g" />
</k:SearchCriteria>
</k:GridViewExportOptions>
</k:GridView.ExportOptions>
<!-- to here -->
Я должен сделать этот хак, и он распространяется только на опцию GridViewExport. Хак в классе GridView ...
public GridViewExportOptions ExportOptions
{
get { return _exportOptions; }
set
{
_exportOptions = value;
if (value != null)
{
ExportOptions.SetBinding(FrameworkContentElement.DataContextProperty,
new Binding("DataContext")
{
Source = this,
Mode = BindingMode.TwoWay
});
}
}
}