1

Topic: [WPF] For what Ignorable?

Kind time of days, dear colleagues! I started to understand with WPF. I am engaged in it on MSVS-2015. In xaml the files generated by studio, I was surprised with presence of line Ignorable: <Window xmlns = "http://schemas.microsoft.com/winfx/2006 … esentation" xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d = "http://schemas.microsoft.com/expression/blend/2008" xmlns:mc = "http://schemas.openxmlformats.org/marku … ility/2006" xmlns:local = "clr-namespace:BRCSCore" xmlns:dxe = "http://schemas.devexpress.com/winfx/2008/xaml/editors" x:Class = "BRCSCore. RCAddEditDonateWnd" mc:Ignorable = "d" Title = "BRCSCore. RCAddEditDonateWnd" Height = "350" Width = "430">......... </Window> I rummaged both in the Internet, and in the literature - but an intelligible explanation on following questions could not find: 1) For what the line with "Ignorable" all the same serves? What, for what and under what conditions it is ignored? To comments like as it is applied: <!-...-> therefore assignment "Ignorable" is not obvious. 2) whether the line ' mlns:d = ' is included into the conflict with mc:Ignorable = "d"? An explanation for what all remaining lines serve, I found. I thank, for any helps!

2

Re: [WPF] For what Ignorable?

Hello, AlexGin, you wrote: AG> 1) For what the line with "Ignorable" all the same serves? What, for what and under what conditions it is ignored? Quick tip: Commenting out properties in XAML AG> 2) whether the line ' mlns:d = ' is included into the conflict with mc:Ignorable = "d"? Ignorable does not define new namespace so the conflict is not present.... <<RSDN@Home 1.3.108 alpha 5 rev. 56>>

3

Re: [WPF] For what Ignorable?

Hello, AlexGin, you wrote: AG> In xaml the files generated by studio, I was surprised with presence of line Ignorable: [skipped] AG> I Thank, for any helps! https://docs.microsoft.com/en-us/dotnet … -attribute official dock (suddenly)... From the first link in Google on demand of search "http://schemas.openxmlformats.org/marku … ility/2006" (too suddenly)... It is necessary to give Especial attention to the second paragraph in section Remarks: Elements or attributes where the prefix portion of the element name are identified as mc:Ignorable will not raise errors when processed by a XAML processor. If that attribute could not be resolved to an underlying type or programming construct, then that element is ignored And if to go into detail, these attributes are used to specify, for example, separate DataSource in designer XAML in studio. It becomes just through namespace "d"... As an example: <Window x:class = "WpfApplication1.Window1" xmlns = "http://schemas.microsoft.com/winfx/2006 … esentation" xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local = "clr-namespace:WpfApplication1" xmlns:designData = "clr-namespace:WpfApplication1.DesignData" xmlns:runtimeData = "clr-namespace:WpfApplication1.RuntimeData" xmlns:mc = "http://schemas.openxmlformats.org/marku … ility/2006" xmlns:d = "http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable = "d" d:DataContext = "{x:Static designData:DesignTimeData. Window1}" DataContext = "{x:Static runtimeData:AppDataProvider. Window1}"> <! - window contents-> </Window> in this example in the designer the data from  properties WpfApplication1.DesignData.DesignTimeData.Window1, and in  - WpfApplication1.RuntimeData.AppDataProvider.Window1 will be substituted.... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

4

Re: [WPF] For what Ignorable?

Hello, Hacker_Delphi, you wrote: H_D> in this example in the designer the data from  properties WpfApplication1.DesignData.DesignTimeData.Window1, and in  - WpfApplication1.RuntimeData.AppDataProvider.Window1 will be substituted. That is - here (in XAML) - it is possible to define various variants of behavior/type  for disign-time and run-time! Fine!

5

Re: [WPF] For what Ignorable?

Hello, AlexGin, you wrote: AG> That is - here (in XAML) - it is possible to define various variants of behavior/type  for disign-time and run-time! AG> it is healthy! Yes, so... Moreover, if to use as value Markup Extension {d:DesignInstance} - it will be created Mock object in which values will correspond to names of properties (I do not remember about not string values, but something there will lie too)...... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>