Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Documents / DocumentStructures / StoryFragments.cs / 1 / StoryFragments.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// History:
// 05/12/2005 : mingliu - created.
//
//
//---------------------------------------------------------------------------
using MS.Internal.Documents;
using MS.Utility;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Reflection;
using System.Security.Permissions;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Windows.Markup;
[assembly: XmlnsDefinition(
"http://schemas.microsoft.com/xps/2005/06/documentstructure",
"System.Windows.Documents.DocumentStructures")]
namespace System.Windows.Documents.DocumentStructures
{
///
///
///
public class StoryFragments : IAddChildInternal
{
///
///
///
public StoryFragments()
{
_elementList = new List();
}
void IAddChild.AddChild(object value)
{
//
// Only the StoryFragment type are accepted.
//
if (value is StoryFragment)
{
_elementList.Add( (StoryFragment) value);
return;
}
throw new ArgumentException(SR.Get(SRID.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), "value");
}
void IAddChild.AddText(string text) { }
internal List StoryFragmentList
{
get
{
return _elementList;
}
}
private List _elementList;
}
///
///
///
public class StoryFragment : IAddChildInternal
{
///
///
///
public StoryFragment()
{
_elementList = new List();
}
void IAddChild.AddChild(object value)
{
//
// Only the following type are accepted.
// Section|Paragraph|Inline(Bold|Italic|Underline)|Floater|Figure|List
// |Table|StoryBreak
//
if (value is SectionStructure || value is ParagraphStructure || value is FigureStructure
|| value is ListStructure || value is TableStructure || value is StoryBreak)
{
_elementList.Add( (BlockElement) value);
return;
}
throw new ArgumentException(SR.Get(SRID.DocumentStructureUnexpectedParameterType6, value.GetType(),
typeof(SectionStructure), typeof(ParagraphStructure), typeof(FigureStructure), typeof(ListStructure), typeof(TableStructure), typeof(StoryBreak)),
"value");
}
void IAddChild.AddText(string text) { }
///
/// The element name
///
public string StoryName
{
get
{
return _storyName;
}
set
{
_storyName = value;
}
}
///
/// The element name
///
public string FragmentName
{
get
{
return _fragmentName;
}
set
{
_fragmentName = value;
}
}
///
/// The element name
///
public String FragmentType
{
get
{
return _fragmentType;
}
set
{
_fragmentType = value;
}
}
internal List BlockElementList
{
get
{
return _elementList;
}
}
private List _elementList;
private String _storyName;
private String _fragmentName;
private String _fragmentType;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// History:
// 05/12/2005 : mingliu - created.
//
//
//---------------------------------------------------------------------------
using MS.Internal.Documents;
using MS.Utility;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Reflection;
using System.Security.Permissions;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Windows.Markup;
[assembly: XmlnsDefinition(
"http://schemas.microsoft.com/xps/2005/06/documentstructure",
"System.Windows.Documents.DocumentStructures")]
namespace System.Windows.Documents.DocumentStructures
{
///
///
///
public class StoryFragments : IAddChildInternal
{
///
///
///
public StoryFragments()
{
_elementList = new List();
}
void IAddChild.AddChild(object value)
{
//
// Only the StoryFragment type are accepted.
//
if (value is StoryFragment)
{
_elementList.Add( (StoryFragment) value);
return;
}
throw new ArgumentException(SR.Get(SRID.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), "value");
}
void IAddChild.AddText(string text) { }
internal List StoryFragmentList
{
get
{
return _elementList;
}
}
private List _elementList;
}
///
///
///
public class StoryFragment : IAddChildInternal
{
///
///
///
public StoryFragment()
{
_elementList = new List();
}
void IAddChild.AddChild(object value)
{
//
// Only the following type are accepted.
// Section|Paragraph|Inline(Bold|Italic|Underline)|Floater|Figure|List
// |Table|StoryBreak
//
if (value is SectionStructure || value is ParagraphStructure || value is FigureStructure
|| value is ListStructure || value is TableStructure || value is StoryBreak)
{
_elementList.Add( (BlockElement) value);
return;
}
throw new ArgumentException(SR.Get(SRID.DocumentStructureUnexpectedParameterType6, value.GetType(),
typeof(SectionStructure), typeof(ParagraphStructure), typeof(FigureStructure), typeof(ListStructure), typeof(TableStructure), typeof(StoryBreak)),
"value");
}
void IAddChild.AddText(string text) { }
///
/// The element name
///
public string StoryName
{
get
{
return _storyName;
}
set
{
_storyName = value;
}
}
///
/// The element name
///
public string FragmentName
{
get
{
return _fragmentName;
}
set
{
_fragmentName = value;
}
}
///
/// The element name
///
public String FragmentType
{
get
{
return _fragmentType;
}
set
{
_fragmentType = value;
}
}
internal List BlockElementList
{
get
{
return _elementList;
}
}
private List _elementList;
private String _storyName;
private String _fragmentName;
private String _fragmentType;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResourceKey.cs
- ReplyChannelAcceptor.cs
- DescendentsWalker.cs
- SQLInt32Storage.cs
- ObjectDataSourceMethodEventArgs.cs
- FileFormatException.cs
- SessionEndedEventArgs.cs
- SQLBinary.cs
- TransformValueSerializer.cs
- XPathNodePointer.cs
- AsyncResult.cs
- PolicyException.cs
- SchemaNamespaceManager.cs
- BaseResourcesBuildProvider.cs
- ClientScriptManager.cs
- BasicExpandProvider.cs
- Int32.cs
- RichTextBox.cs
- SymLanguageVendor.cs
- URIFormatException.cs
- BindingExpressionUncommonField.cs
- WindowsServiceElement.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- PriorityBindingExpression.cs
- Size.cs
- DocumentCollection.cs
- CollectionViewGroupInternal.cs
- WebHttpEndpointElement.cs
- SinglePageViewer.cs
- CryptoStream.cs
- ListViewItemSelectionChangedEvent.cs
- ClientData.cs
- MethodExpression.cs
- ResponseBodyWriter.cs
- NullableDoubleMinMaxAggregationOperator.cs
- QilPatternVisitor.cs
- DataBoundControlAdapter.cs
- CheckBoxStandardAdapter.cs
- MultiBinding.cs
- AuthenticationModuleElement.cs
- QilTypeChecker.cs
- DataControlFieldHeaderCell.cs
- SecurityHelper.cs
- PresentationAppDomainManager.cs
- WhileDesigner.xaml.cs
- DtdParser.cs
- TreeNodeStyle.cs
- DiagnosticTraceSource.cs
- PointKeyFrameCollection.cs
- WaitHandleCannotBeOpenedException.cs
- XmlNodeReader.cs
- Part.cs
- X509Certificate.cs
- ChtmlTextWriter.cs
- FutureFactory.cs
- ImageSource.cs
- categoryentry.cs
- TableParaClient.cs
- AttachedAnnotationChangedEventArgs.cs
- Pkcs7Recipient.cs
- XmlException.cs
- IChannel.cs
- InstancePersistenceCommand.cs
- ComponentFactoryHelpers.cs
- clipboard.cs
- ServiceObjectContainer.cs
- WindowsIdentity.cs
- SrgsDocument.cs
- FileCodeGroup.cs
- KnownTypeDataContractResolver.cs
- TextSchema.cs
- CollectionViewProxy.cs
- HMACSHA1.cs
- DataColumnMapping.cs
- SchemaCollectionPreprocessor.cs
- ScrollEventArgs.cs
- MatrixConverter.cs
- NamespaceList.cs
- ConfigViewGenerator.cs
- Size3D.cs
- DataFormats.cs
- StrongNameMembershipCondition.cs
- WSFederationHttpBinding.cs
- EntityDataSourceContextDisposingEventArgs.cs
- FlagsAttribute.cs
- WindowsFont.cs
- SectionInput.cs
- SerializerDescriptor.cs
- CompilationPass2TaskInternal.cs
- XmlNamespaceManager.cs
- RequiredAttributeAttribute.cs
- PartitionResolver.cs
- MD5.cs
- XmlWhitespace.cs
- XPathNavigatorKeyComparer.cs
- EnvelopedPkcs7.cs
- TimeSpanStorage.cs
- SubstitutionResponseElement.cs
- MsmqOutputMessage.cs
- DelegateBodyWriter.cs