XMLに投稿されたコード一覧

XML タイムラインのTreeView

<TreeView ItemTemplate="{StaticResource StatusDataTemplate}" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.CanContentScroll="True" BorderThickness="0" Background="Transparent" x:Name="listContent"
		 VirtualizingStackPanel.VirtualizationMode="Standard" VirtualizingStackPanel.IsVirtualizing="False"  ScrollViewer.PanningMode="VerticalOnly" ScrollViewer.PanningDeceleration="5" IsManipulationEnabled="True">
	<!--  VirtualizingStackPanel.IsVirtualizing="True" -->
	<TreeView.Resources>
		<sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">60</sys:Double>
	</TreeView.Resources>
	<TreeView.ItemsPanel>
		<ItemsPanelTemplate>
			<VirtualizingStackPanel />
		</ItemsPanelTemplate>
	</TreeView.ItemsPanel>
	<TreeView.ItemContainerStyle>
		<Style TargetType="{x:Type TreeViewItem}">
			<EventSetter Event="MouseDown" Handler="OnItemMouseDown" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TreeViewItem}">
						<ContentPresenter x:Name="PART_Header" ContentSource="Header" />
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Width">
				<Setter.Value>
					<Binding Path="ActualWidth"
						RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type ScrollContentPresenter}}" />
				</Setter.Value>
			</Setter>
		</Style>
	</TreeView.ItemContainerStyle>
</TreeView>

XML 村の建設

CIV4BuildInfos.xml
		<BuildInfo>
			<Type>BUILD_VILLAGE</Type>
			<Description>TXT_KEY_BUILD_VILLAGE</Description>
			<Help/>
			<PrereqTech>TECH_MERCANTILISM</PrereqTech>
			<iTime>800</iTime>
			<iCost>0</iCost>
			<bKill>0</bKill>
			<ImprovementType>IMPROVEMENT_VILLAGE</ImprovementType>
			<RouteType>NONE</RouteType>
			<EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
			<FeatureStructs>
				<FeatureStruct>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<PrereqTech>TECH_MASONRY</PrereqTech>
					<iTime>800</iTime>
					<iProduction>20</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<PrereqTech>TECH_CRAFTING</PrereqTech>
					<iTime>500</iTime>
					<iProduction>30</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST_ANCIENT</FeatureType>
					<PrereqTech>TECH_CRAFTING</PrereqTech>
					<iTime>1000</iTime>
					<iProduction>60</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST_NEW</FeatureType>
					<PrereqTech>TECH_CRAFTING</PrereqTech>
					<iTime>0</iTime>
					<iProduction>0</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST_BLIGHTED</FeatureType>
					<PrereqTech>TECH_CRAFTING</PrereqTech>
					<iTime>250</iTime>
					<iProduction>0</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST_BURNT</FeatureType>
					<PrereqTech>TECH_CRAFTING</PrereqTech>
					<iTime>250</iTime>
					<iProduction>0</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_DEEP_JUNGLE</FeatureType>
					<PrereqTech>TECH_MASONRY</PrereqTech>
					<iTime>1000</iTime>
					<iProduction>30</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_SCRUB</FeatureType>
					<PrereqTech>TECH_CRAFTING</PrereqTech>
					<iTime>250</iTime>
					<iProduction>10</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_SWAMP</FeatureType>
					<PrereqTech>TECH_MASONRY</PrereqTech>
					<iTime>1000</iTime>
					<iProduction>0</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
			</FeatureStructs>
			<HotKey>KB_T</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>,Art/Interface/Buttons/Builds/BuildVillage.dds,Art/Interface/Buttons/Actions_Builds_LeaderHeads_Specialists_Atlas.dds,5,9</Button>
		</BuildInfo>

CIV4UnitInfos.xml
				<Build>
					<BuildType>BUILD_VILLAGE</BuildType>
					<bBuild>1</bBuild>
				</Build>

text.xml
	<TEXT>
		<Tag>TXT_KEY_BUILD_VILLAGE</Tag>
		<English>Build Village</English>
		<French/>
		<German/>
		<Italian/>
		<Spanish/>
		<Japanese>[LINK=IMPROVEMENT_VILLAGE]村[\LINK]を建設</Japanese>
	</TEXT>

XML タブをXP風にしてみた

                <TabControl.Resources>
                    <Style TargetType="TabItem">
                        <Setter Property="Focusable" Value="False"/>
                        <EventSetter Event="PreviewMouseDown" Handler="TabItem_PreviewMouseDown"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="TabItem">
                                    <Border Name="border"
                                            Margin="0,3,0,0"
                                            Focusable="False"
                                            BorderBrush="Gray"
                                            BorderThickness="1"
                                            CornerRadius="3,3,0,0">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="White" Offset="0" />
                                                <GradientStop Color="#FFEDECE7" Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.Background>

                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="auto"/>
                                                <RowDefinition/>
                                            </Grid.RowDefinitions>

                                            <Border Name="selectedBorder"
                                                    Grid.Row="0"
                                                    BorderThickness="1,1,1,0"
                                                    CornerRadius="3,3,0,0"
                                                    BorderBrush="#FFE68B2C"
                                                    Visibility="Collapsed">
                                                <Rectangle Fill="#FFFFC73C"
                                                           Height="3"/>
                                            </Border>

                                            <ContentPresenter Grid.Row="1"
                                                              ContentSource="Header"
                                                              Margin="10,2,10,2"/>
                                        </Grid>
                                    </Border>

                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsSelected" Value="True">
                                            <Setter Property="Panel.ZIndex" Value="100" />
                                            <Setter TargetName="border" Property="Background" Value="White" />
                                            <Setter TargetName="border" Property="BorderThickness" Value="1,0,1,0" />
                                            <Setter TargetName="border" Property="Margin" Value="-1,0,-1,0"/>
                                            <Setter TargetName="selectedBorder" Property="Visibility" Value="Visible"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </TabControl.Resources>

XML androidのTextViewで影付き文字を表示する

<TextView
    android:id="@+id/text1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="こんにちわ!こんにちわ!!"
    android:textSize="40px"
    android:textColor="#FFFFFFFF"
    android:shadowColor="#FF000000"
    android:shadowDx="1.2"
    android:shadowDy="1.2"
    android:shadowRadius="0.1"
    />

<!--

http://groups.google.com/group/android-developers/browse_thread/thread/444059ba467c5ff6?pli=1

-->

よく投稿されているコード

タグ

最近投稿されたコード