if errorlevel 1 goto end
"%IDE_PATH%\devenv" /build "%BUILD_TYPE%" ..\WPF\FooEditEngine.sln
if errorlevel 1 goto end
-:"%IDE_PATH%\devenv" /build "%BUILD_TYPE%|%CPU_TYPE%" ..\Metro\Test.sln
-:if errorlevel 1 goto end
"%IDE_PATH%\devenv" /build "%BUILD_TYPE%|%CPU_TYPE%" ..\UWP\FooEditEngine.UWP.sln
if errorlevel 1 goto end
"%BUILD_PATH%\MSBuild.exe" /p:Configuration=Release ..\Help\fooeditengine_api.shfbproj
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Collections.Generic;
-using Windows.Graphics.Display;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Media.Imaging;
-using SharpDX;
-using DXGI = SharpDX.DXGI;
-using D2D = SharpDX.Direct2D1;
-using D3D = SharpDX.Direct3D;
-using D3D11 = SharpDX.Direct3D11;
-using FooEditEngine.Metro;
-using DotNetTextStore;
-using DotNetTextStore.UnmanagedAPI.TSF;
-using DotNetTextStore.UnmanagedAPI.WinDef;
-
-namespace FooEditEngine
-{
- sealed class D2DRender : D2DRenderBase,IEditorRender
- {
- SurfaceImageSource SurfaceImage;
- DXGI.ISurfaceImageSourceNative SurfaceImageNative;
- D2D.Device D2DDevice;
- D2D.DeviceContext D2DContext;
- D2D.Bitmap1 Bitmap;
- Size Size = new Size();
- DXGI.Surface Surface;
- TextStore2 store;
-
- public D2DRender(FooTextBox textbox,Windows.UI.Xaml.Shapes.Rectangle rect,TextStore2 store)
- : base()
- {
- this.ConstructDeviceResource(rect.ActualWidth,rect.ActualHeight);
- this.InitTextFormat(textbox.FontFamily, textbox.FontSize);
-
- this.store = store;
-
- this.Size.Width = rect.ActualWidth;
- this.Size.Height = rect.ActualHeight;
-
- this.CreateSurface(rect, rect.ActualWidth, rect.ActualHeight);
-
- base.PreDrawOneLine = D2DRender_PreDrawOneLine;
-
- this.Foreground = D2DRenderBase.ToColor4( textbox.Foreground);
- this.Background = D2DRenderBase.ToColor4(textbox.Background);
- this.Hilight = D2DRenderBase.ToColor4(textbox.Hilight);
- this.Keyword1 = D2DRenderBase.ToColor4(textbox.Keyword1);
- this.Keyword2 = D2DRenderBase.ToColor4(textbox.Keyword2);
- this.Literal = D2DRenderBase.ToColor4(textbox.Literal);
- this.Url = D2DRenderBase.ToColor4(textbox.URL);
- this.ControlChar = D2DRenderBase.ToColor4(textbox.ControlChar);
- this.Comment = D2DRenderBase.ToColor4(textbox.Comment);
- this.InsertCaret = D2DRenderBase.ToColor4(textbox.InsertCaret);
- this.OverwriteCaret = D2DRenderBase.ToColor4(textbox.OverwriteCaret);
- this.LineMarker = D2DRenderBase.ToColor4(textbox.LineMarker);
- this.UpdateArea = D2DRenderBase.ToColor4(textbox.UpdateArea);
- this.LineNumber = D2DRenderBase.ToColor4(textbox.LineNumber);
- }
-
- void D2DRender_PreDrawOneLine(MyTextLayout layout,LineToIndexTable lti, int row, double x, double y)
- {
- using (Unlocker locker = this.store.LockDocument(false))
- {
- int lineIndex = lti.GetIndexFromLineNumber(row);
- int lineLength = lti.GetLengthFromLineNumber(row);
- foreach (TextDisplayAttribute attr in this.store.EnumAttributes(lineIndex, lineIndex + lineLength))
- {
- if (attr.startIndex == attr.endIndex)
- continue;
- int length = attr.endIndex - attr.startIndex;
- int start = attr.startIndex - lineIndex;
-
- HilightType type = HilightType.None;
- Color4? color = null;
- switch (attr.attribute.lsStyle)
- {
- case TF_DA_LINESTYLE.TF_LS_DOT:
- type = HilightType.Dot;
- color = this.Foreground;
- break;
- case TF_DA_LINESTYLE.TF_LS_SOLID:
- type = HilightType.Sold;
- color = this.Foreground;
- break;
- case TF_DA_LINESTYLE.TF_LS_DASH:
- type = HilightType.Dash;
- color = this.Foreground;
- break;
- case TF_DA_LINESTYLE.TF_LS_SQUIGGLE:
- type = HilightType.Squiggle;
- color = this.Foreground;
- break;
- }
-
- if (attr.attribute.crBk.type != TF_DA_COLORTYPE.TF_CT_NONE)
- {
- type = HilightType.Select;
- color = this.Hilight;
- }
-
- this.DrawMarkerEffect(layout, type, start, length, x, y, attr.attribute.fBoldLine, color);
- }
- }
- }
-
- public override void GetDpi(out float dpix, out float dpiy)
- {
- Util.GetDpi(out dpix, out dpiy);
- }
-
- public bool Resize(Windows.UI.Xaml.Shapes.Rectangle rect, double width, double height)
- {
- if (this.Size.Width == width && this.Size.Height == height)
- return false;
- this.ReConstructDeviceResource(width, height);
- this.CreateSurface(rect, width, height);
- return true;
- }
-
- public bool IsCanDraw()
- {
- return this.Size.Height != 0 && this.Size.Width != 0;
- }
-
- public void DrawContent(EditView view,bool IsEnabled,Rectangle updateRect)
- {
- SharpDX.Mathematics.Interop.RawPoint offset;
- this.Surface = this.SurfaceImageNative.BeginDraw(
- new SharpDX.Rectangle(0, 0, (int)this.Size.Width, (int)this.Size.Height), out offset);
- float dpix, dpiy;
- this.GetDpi(out dpix, out dpiy);
- D2D.BitmapProperties1 prop = new D2D.BitmapProperties1(new D2D.PixelFormat(DXGI.Format.B8G8R8A8_UNorm, D2D.AlphaMode.Premultiplied),
- dpix, dpiy, D2D.BitmapOptions.Target | D2D.BitmapOptions.CannotDraw);
- this.Bitmap = new D2D.Bitmap1(this.D2DContext, this.Surface, prop);
- this.D2DContext.Target = this.Bitmap;
- this.D2DContext.Transform = Matrix3x2.Translation(offset.X, offset.Y);
- base.BegineDraw();
-
- if (IsEnabled)
- view.Draw(updateRect);
- else
- this.FillBackground(updateRect);
-
- base.EndDraw();
- this.Surface.Dispose();
- this.Bitmap.Dispose();
- this.SurfaceImageNative.EndDraw();
- }
-
- void CreateSurface(Windows.UI.Xaml.Shapes.Rectangle rect, double width, double height)
- {
- if (this.SurfaceImageNative != null)
- this.SurfaceImageNative.Dispose();
- this.SurfaceImage = new SurfaceImageSource((int)width, (int)height);
- this.SurfaceImageNative = ComObject.As<DXGI.ISurfaceImageSourceNative>(this.SurfaceImage);
- this.SurfaceImageNative.Device = this.DXGIDevice;
- this.Size.Width = width;
- this.Size.Height = height;
- ImageBrush brush = new ImageBrush();
- brush.ImageSource = this.SurfaceImage;
- rect.Fill = brush;
- }
-
- protected override D2D.RenderTarget ConstructRender(D2D.Factory1 factory, D2D.RenderTargetProperties prop, double width, double height)
- {
- this.D2DDevice = new D2D.Device(factory,this.DXGIDevice);
- this.D2DContext = new D2D.DeviceContext(this.D2DDevice, D2D.DeviceContextOptions.None);
- return this.D2DContext;
- }
-
- protected override void ConstrctedResource()
- {
- }
-
- protected override void DestructRender()
- {
- if (this.D2DDevice != null)
- this.D2DDevice.Dispose();
- if (this.D2DContext != null)
- this.D2DContext.Dispose();
- }
-
- protected override void ReCreateTarget()
- {
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Collections.Generic;
-using Windows.Graphics.Display;
-using Windows.UI.Text;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Media.Imaging;
-using SharpDX;
-using DXGI = SharpDX.DXGI;
-using D2D = SharpDX.Direct2D1;
-using DW = SharpDX.DirectWrite;
-using D3D = SharpDX.Direct3D;
-using D3D11 = SharpDX.Direct3D11;
-using FooEditEngine.Metro;
-
-namespace FooEditEngine
-{
- class D2DRenderBase: D2DRenderCommon,IDisposable
- {
- public const int MiniumeWidth = 40; //これ以上ないと誤操作が起こる
-
- protected DXGI.Device DXGIDevice;
- protected D3D11.Device1 D3DDevice;
- Windows.UI.Color ForegroundColor, BackgroundColor, HilightColor, Keyword1Color, Keyword2Color, LiteralColor, UrlColor, ControlCharColor, CommentColor, InsertCaretColor, OverwriteCaretColor, LineMarkerColor,UpdateAreaColor;
- FontFamily fontFamily;
- FontStyle fontStyle = FontStyle.Normal;
- FontWeight fontWeigth;
- double fontSize;
-
- public D2DRenderBase()
- {
- var creationFlags = SharpDX.Direct3D11.DeviceCreationFlags.VideoSupport | SharpDX.Direct3D11.DeviceCreationFlags.BgraSupport;
- D3D.FeatureLevel[] featureLevels ={D3D.FeatureLevel.Level_11_1,
- D3D.FeatureLevel.Level_11_0,
- D3D.FeatureLevel.Level_10_1,
- D3D.FeatureLevel.Level_10_0,
- D3D.FeatureLevel.Level_9_3,
- D3D.FeatureLevel.Level_9_2,
- D3D.FeatureLevel.Level_9_1};
- using (var device = new D3D11.Device(D3D.DriverType.Hardware, creationFlags, featureLevels))
- {
- this.D3DDevice = device.QueryInterface<D3D11.Device1>();
- }
- this.DXGIDevice = this.D3DDevice.QueryInterface<DXGI.Device>();
- }
-
- public void InitTextFormat(string fontName, double size)
- {
- base.InitTextFormat(fontName, (float)size);
- this.fontSize = size;
- }
-
- public void InitTextFormat(FontFamily font, double size)
- {
- base.InitTextFormat(font.Source, (float)size);
- this.fontFamily = font;
- this.fontSize = size;
- }
-
- public override void Dispose()
- {
- if (this.DXGIDevice != null)
- this.DXGIDevice.Dispose();
- if (this.D3DDevice != null)
- this.D3DDevice.Dispose();
- base.Dispose();
- }
-
- public FontFamily FontFamily
- {
- get { return this.fontFamily; }
- set
- {
- this.fontFamily = value;
- this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(this.fontWeigth), this.GetDWFontStyle(this.fontStyle));
- this.TabWidthChar = this.TabWidthChar;
- }
- }
-
- public double FontSize
- {
- get { return this.fontSize; }
- set
- {
- this.fontSize = value;
- this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(this.fontWeigth), this.GetDWFontStyle(this.fontStyle));
- this.TabWidthChar = this.TabWidthChar;
- }
- }
-
- public FontWeight FontWeigth
- {
- get
- {
- return this.fontWeigth;
- }
- set
- {
- this.fontWeigth = value;
- this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(value), this.GetDWFontStyle(this.fontStyle));
- }
- }
-
- public FontStyle FontStyle
- {
- get
- {
- return this.fontStyle;
- }
- set
- {
- this.fontStyle = value;
- this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(this.fontWeigth), this.GetDWFontStyle(this.fontStyle));
- }
- }
-
- DW.FontStyle GetDWFontStyle(FontStyle style)
- {
- return (DW.FontStyle)Enum.Parse(typeof(DW.FontStyle), style.ToString());
- }
-
- DW.FontWeight GetDWFontWeigth(FontWeight weigth)
- {
- if (weigth.Weight == 0)
- return (DW.FontWeight)400;
- else
- return (DW.FontWeight)weigth.Weight;
- }
-
- public static Color4 ToColor4(Windows.UI.Color color)
- {
- return new Color4(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
- }
-
- protected PreDrawOneLineHandler PreDrawOneLine;
-
- public override void CacheContent()
- {
- }
-
- public override void DrawCachedBitmap(Rectangle rect)
- {
- }
-
- public override bool IsVaildCache()
- {
- return false;
- }
-
- public void DrawOneLine(Document doc,LineToIndexTable lti, int row, double x, double y)
- {
- this.DrawOneLine(doc,
- lti,
- row,
- x,
- y,
- this.PreDrawOneLine);
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>FooEditEngine</RootNamespace>
- <AssemblyName>FooEditEngine.Metro</AssemblyName>
- <DefaultLanguage>ja-JP</DefaultLanguage>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <TargetPlatformVersion>8.1</TargetPlatformVersion>
- <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
- <TargetFrameworkVersion />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NETFX_CORE,METRO,ENABLE_AUTMATION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>bin\Debug\FooEditEngine.Metro.XML</DocumentationFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE,METRO,ENABLE_AUTMATION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>bin\Release\FooEditEngine.Metro.XML</DocumentationFile>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\ARM\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
- <OutputPath>bin\ARM\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
- <OutputPath>bin\x64\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
- <Page Include="Themes\Generic.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Direct2D\D2DRender.cs" />
- <Compile Include="Direct2D\D2DRenderBase.cs" />
- <Compile Include="FooPrintText.cs" />
- <Compile Include="FooTextBox.cs" />
- <Compile Include="Print\ComInterface.cs" />
- <Compile Include="Print\D2DPrintRender.cs" />
- <Compile Include="Print\DocumentSource.cs" />
- <Compile Include="Print\D2DPrintPreviewRender.cs" />
- <Compile Include="Print\PrintOptionBuilder.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <PRIResource Include="strings\en-US\Resources.resw" />
- </ItemGroup>
- <ItemGroup>
- <PRIResource Include="strings\ja-JP\Resources.resw" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\DotNetTextStore\DotNetTextStore.Metro.csproj">
- <Project>{453c491e-ef3a-41ad-a725-8855c1cb2c84}</Project>
- <Name>DotNetTextStore.Metro</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Reference Include="SharpDX, Version=3.0.2.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\Libs\StoreApp\SharpDX.dll</HintPath>
- </Reference>
- <Reference Include="SharpDX.Direct2D1, Version=3.0.2.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\Libs\StoreApp\SharpDX.Direct2D1.dll</HintPath>
- </Reference>
- <Reference Include="SharpDX.Direct3D11, Version=3.0.2.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\Libs\StoreApp\SharpDX.Direct3D11.dll</HintPath>
- </Reference>
- <Reference Include="SharpDX.DXGI, Version=3.0.2.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\Libs\StoreApp\SharpDX.DXGI.dll</HintPath>
- </Reference>
- <Reference Include="SharpDX.Mathematics, Version=3.0.2.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\Libs\StoreApp\SharpDX.Mathematics.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="..\..\Core\Core.projitems" Label="Shared" />
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
- <VisualStudioVersion>12.0</VisualStudioVersion>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
+++ /dev/null
-/*\r
- * Copyright (C) 2013 FooProject\r
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\r
-\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of \r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-using FooEditEngine;\r
-using Windows.UI.Core;\r
-using Windows.Foundation;\r
-using Windows.Graphics.Printing;\r
-using Windows.Graphics.Printing.OptionDetails;\r
-\r
-namespace FooEditEngine.Metro\r
-{\r
- /// <summary>\r
- /// 印刷を行うクラス\r
- /// </summary>\r
- public class FooPrintText\r
- {\r
- /// <summary>\r
- /// コンストラクター\r
- /// </summary>\r
- public FooPrintText()\r
- {\r
- this.PrintStart += (s, e) => { };\r
- this.PrintComplete += (s, e) => { };\r
- this.ParseHF = (s, e) => { return e.Original; };\r
- }\r
-\r
- DocumentSource source;\r
- /// <summary>\r
- /// ヘッダーやフッターを処理する\r
- /// </summary>\r
- public ParseCommandHandler ParseHF;\r
-\r
- /// <summary>\r
- /// ヘッダー\r
- /// </summary>\r
- public string Header;\r
-\r
- /// <summary>\r
- /// フッター\r
- /// </summary>\r
- public string Fotter;\r
-\r
- /// <summary>\r
- /// 余白\r
- /// </summary>\r
- public Padding Padding;\r
-\r
- /// <summary>\r
- /// 印刷が開始したことを表す\r
- /// </summary>\r
- public event EventHandler PrintStart;\r
-\r
- /// <summary>\r
- /// 印刷が完了したことを表す\r
- /// </summary>\r
- public event EventHandler PrintComplete;\r
-\r
- /// <summary>\r
- /// 印刷する\r
- /// </summary>\r
- /// <param name="req">PrintTaskRequestオブジェクト</param>\r
- /// <param name="title">タイトル</param>\r
- /// <param name="textbox">印刷対象のテキストボックス</param>\r
- public void Print(PrintTaskRequest req,string title,FooTextBox textbox)\r
- {\r
- IAsyncAction async = textbox.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>\r
- {\r
- this.PrintStart(this, null);\r
- source = new DocumentSource(textbox,this.Padding);\r
- source.ParseHF = ParseHF;\r
- source.Header = Header;\r
- source.Fotter = Fotter;\r
-\r
- PrintTask task = null;\r
- task = req.CreatePrintTask(title, (e) =>\r
- {\r
- e.SetSource(source);\r
- });\r
- task.Completed += async (sender, e) => {\r
- source.Dispose();\r
- await textbox.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {\r
- this.PrintComplete(this, null);\r
- });\r
- };\r
- PrintOptionBuilder<DocumentSource> builder = new PrintOptionBuilder<DocumentSource>(source);\r
- builder.BuildPrintOption(PrintTaskOptionDetails.GetFromPrintTaskOptions(task.Options));\r
- });\r
- Task t = WindowsRuntimeSystemExtensions.AsTask(async);\r
- t.Wait();\r
- }\r
- }\r
-}\r
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Text;
-using System.ComponentModel;
-using System.Threading.Tasks;
-using Windows.ApplicationModel.Resources.Core;
-using Windows.Devices.Input;
-using Windows.System;
-using Windows.ApplicationModel.DataTransfer;
-using Windows.Foundation;
-using Windows.UI;
-using Windows.UI.Input;
-using Windows.UI.Core;
-using Windows.UI.Popups;
-using Windows.UI.Text;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Input;
-using DotNetTextStore;
-using DotNetTextStore.UnmanagedAPI.TSF;
-using DotNetTextStore.UnmanagedAPI.WinDef;
-
-// テンプレート コントロールのアイテム テンプレートについては、http://go.microsoft.com/fwlink/?LinkId=234235 を参照してください
-
-namespace FooEditEngine.Metro
-{
- /// <summary>
- /// テキストボックスコントロール
- /// </summary>
- public sealed class FooTextBox : Control,IDisposable
- {
- EditView View;
- Controller _Controller;
- D2DRender Render;
- ScrollBar horizontalScrollBar, verticalScrollBar;
- Windows.UI.Xaml.Shapes.Rectangle rectangle;
- GestureRecognizer gestureRecongnizer = new GestureRecognizer();
- TextStore2 textStore;
- FooTextBoxAutomationPeer peer;
- bool nowCaretMove = false;
- Document _Document;
- DispatcherTimer timer = new DispatcherTimer();
-
- /// <summary>
- /// コンストラクター
- /// </summary>
- public FooTextBox()
- {
- this.DefaultStyleKey = typeof(FooTextBox);
-
- this.textStore = new TextStore2();
- this.textStore.IsLoading += textStore_IsLoading;
- this.textStore.IsReadOnly += textStore_IsReadOnly;
- this.textStore.GetStringLength += () => this.Document.Length;
- this.textStore.GetString += _textStore_GetString;
- this.textStore.GetSelectionIndex += _textStore_GetSelectionIndex;
- this.textStore.SetSelectionIndex += _textStore_SetSelectionIndex;
- this.textStore.InsertAtSelection += _textStore_InsertAtSelection;
- this.textStore.GetScreenExtent += _textStore_GetScreenExtent;
- this.textStore.GetStringExtent += _textStore_GetStringExtent;
- this.textStore.CompositionStarted += textStore_CompositionStarted;
- this.textStore.CompositionUpdated += textStore_CompositionUpdated;
- this.textStore.CompositionEnded += textStore_CompositionEnded;
-
- this.rectangle = new Windows.UI.Xaml.Shapes.Rectangle();
- this.rectangle.Margin = this.Padding;
- this.Render = new D2DRender(this,this.rectangle,this.textStore);
-
- this.Document = new Document();
-
- this.View = new EditView(this.Document, this.Render, new Padding(5, Gripper.HitAreaWidth, Gripper.HitAreaWidth / 2, Gripper.HitAreaWidth));
- this.View.SrcChanged += View_SrcChanged;
- this.View.InsertMode = this.InsertMode;
- this.Document.DrawLineNumber = this.DrawLineNumber;
- this.View.HideCaret = !this.DrawCaret;
- this.View.HideLineMarker = !this.DrawCaretLine;
- this.Document.HideRuler = !this.DrawRuler;
- this.Document.UrlMark = this.MarkURL;
- this.Document.TabStops = this.TabChars;
-
- this._Controller = new Controller(this.Document, this.View);
- this.Document.SelectionChanged += Controller_SelectionChanged;
-
- this.gestureRecongnizer.GestureSettings = GestureSettings.Drag |
- GestureSettings.RightTap |
- GestureSettings.Tap |
- GestureSettings.DoubleTap |
- GestureSettings.ManipulationTranslateX |
- GestureSettings.ManipulationTranslateY |
- GestureSettings.ManipulationScale |
- GestureSettings.ManipulationTranslateInertia |
- GestureSettings.ManipulationScaleInertia;
- this.gestureRecongnizer.RightTapped += gestureRecongnizer_RightTapped;
- this.gestureRecongnizer.Tapped += gestureRecongnizer_Tapped;
- this.gestureRecongnizer.Dragging += gestureRecongnizer_Dragging;
- this.gestureRecongnizer.ManipulationInertiaStarting += GestureRecongnizer_ManipulationInertiaStarting; ;
- this.gestureRecongnizer.ManipulationStarted += gestureRecongnizer_ManipulationStarted;
- this.gestureRecongnizer.ManipulationUpdated += gestureRecongnizer_ManipulationUpdated;
- this.gestureRecongnizer.ManipulationCompleted += gestureRecongnizer_ManipulationCompleted;
-
- this.timer.Interval = new TimeSpan(0, 0, 0, 0, 500);
- this.timer.Tick += this.timer_Tick;
- this.timer.Start();
-
- //Viewの初期化が終わった直後に置かないと例外が発生する
- this.Document.Update += Document_Update;
-
- Window.Current.CoreWindow.CharacterReceived += CoreWindow_CharacterReceived;
-
- this.SizeChanged += FooTextBox_SizeChanged;
-
- this.Loaded += FooTextBox_Loaded;
- }
-
- /// <summary>
- /// ファイナライザー
- /// </summary>
- ~FooTextBox()
- {
- this.Dispose(false);
- }
-
- /// <summary>
- /// アンマネージドリソースを解放する
- /// </summary>
- public void Dispose()
- {
- this.Dispose(true);
- GC.SuppressFinalize(this);
- }
-
- bool Disposed = false;
- private void Dispose(bool disposing)
- {
- if (this.Disposed)
- return;
- if (disposing)
- {
- this.textStore.Dispose();
- this.View.Dispose();
- this.Render.Dispose();
- }
- }
-
- /// <summary>
- /// ドキュメントを選択する
- /// </summary>
- /// <param name="start">開始インデックス</param>
- /// <param name="length">長さ</param>
- public void Select(int start, int length)
- {
- this.Document.Select(start, length);
- }
-
- /// <summary>
- /// キャレットを指定した行に移動させます
- /// </summary>
- /// <param name="index">インデックス</param>
- /// <remarks>このメソッドを呼び出すと選択状態は解除されます</remarks>
- public void JumpCaret(int index)
- {
- this._Controller.JumpCaret(index);
- }
- /// <summary>
- /// キャレットを指定した行と桁に移動させます
- /// </summary>
- /// <param name="row">行番号</param>
- /// <param name="col">桁</param>
- /// <remarks>このメソッドを呼び出すと選択状態は解除されます</remarks>
- public void JumpCaret(int row, int col)
- {
- this._Controller.JumpCaret(row, col);
- }
-
- /// <summary>
- /// 選択中のテキストをクリップボードにコピーします
- /// </summary>
- public void Copy()
- {
- string text = this._Controller.SelectedText;
- if (text != null && text != string.Empty)
- {
- DataPackage dataPackage = new DataPackage();
- dataPackage.RequestedOperation = DataPackageOperation.Copy;
- dataPackage.SetText(text);
-
- Clipboard.SetContent(dataPackage);
- }
- }
-
- /// <summary>
- /// 選択中のテキストをクリップボードに切り取ります
- /// </summary>
- public void Cut()
- {
- string text = this._Controller.SelectedText;
- if (text != null && text != string.Empty)
- {
- DataPackage dataPackage = new DataPackage();
- dataPackage.RequestedOperation = DataPackageOperation.Copy;
- dataPackage.SetText(text);
-
- Clipboard.SetContent(dataPackage);
-
- this._Controller.SelectedText = "";
- }
- }
-
- /// <summary>
- /// 選択中のテキストを貼り付けます
- /// </summary>
- public async Task PasteAsync()
- {
- var dataPackageView = Clipboard.GetContent();
- if (dataPackageView.Contains(StandardDataFormats.Text))
- {
- this._Controller.SelectedText = await dataPackageView.GetTextAsync();
- }
- }
-
- /// <summary>
- /// すべて選択する
- /// </summary>
- public void SelectAll()
- {
- this.Document.Select(0, this.Document.Length);
- }
-
- /// <summary>
- /// 選択を解除する
- /// </summary>
- public void DeSelectAll()
- {
- this._Controller.DeSelectAll();
- }
-
- /// <summary>
- /// 対応する座標を返します
- /// </summary>
- /// <param name="tp">テキストポイント</param>
- /// <returns>座標</returns>
- /// <remarks>テキストポイントがクライアント領域の原点より外にある場合、返される値は原点に丸められます</remarks>
- public Windows.Foundation.Point GetPostionFromTextPoint(TextPoint tp)
- {
- if (this.Document.FireUpdateEvent == false)
- throw new InvalidOperationException("");
- return this.View.GetPostionFromTextPoint(tp);
- }
-
- /// <summary>
- /// 対応するテキストポイントを返します
- /// </summary>
- /// <param name="p">クライアント領域の原点を左上とする座標</param>
- /// <returns>テキストポイント</returns>
- public TextPoint GetTextPointFromPostion(Windows.Foundation.Point p)
- {
- if (this.Document.FireUpdateEvent == false)
- throw new InvalidOperationException("");
- return this.View.GetTextPointFromPostion(p);
- }
-
- /// <summary>
- /// 行の高さを取得します
- /// </summary>
- /// <param name="row">レイアウト行</param>
- /// <returns>行の高さ</returns>
- public double GetLineHeight(int row)
- {
- if (this.Document.FireUpdateEvent == false)
- throw new InvalidOperationException("");
- return this.View.LayoutLines.GetLayout(row).Height; ;
- }
-
- /// <summary>
- /// インデックスに対応する座標を得ます
- /// </summary>
- /// <param name="index">インデックス</param>
- /// <returns>座標を返す</returns>
- public Windows.Foundation.Point GetPostionFromIndex(int index)
- {
- if (this.Document.FireUpdateEvent == false)
- throw new InvalidOperationException("");
- TextPoint tp = this.View.GetLayoutLineFromIndex(index);
- return this.View.GetPostionFromTextPoint(tp);
- }
-
- /// <summary>
- /// 座標からインデックスに変換します
- /// </summary>
- /// <param name="p">座標</param>
- /// <returns>インデックスを返す</returns>
- public int GetIndexFromPostion(Windows.Foundation.Point p)
- {
- if (this.Document.FireUpdateEvent == false)
- throw new InvalidOperationException("");
- TextPoint tp = this.View.GetTextPointFromPostion(p);
- return this.View.GetIndexFromLayoutLine(tp);
- }
-
- /// <summary>
- /// 再描写する
- /// </summary>
- public void Refresh()
- {
- this.Refresh(this.View.PageBound);
- }
-
- /// <summary>
- /// レイアウト行をすべて破棄し、再度レイアウトを行う
- /// </summary>
- public void PerfomLayouts()
- {
- this.View.PerfomLayouts();
- }
-
- /// <summary>
- /// 指定行までスクロールする
- /// </summary>
- /// <param name="row">行</param>
- /// <param name="alignTop">指定行を画面上に置くなら真。そうでないなら偽</param>
- public void ScrollIntoView(int row, bool alignTop)
- {
- this.View.ScrollIntoView(row, alignTop);
- }
-
- /// <summary>
- /// ファイルからドキュメントを構築する
- /// </summary>
- /// <param name="sr">StremReader</param>
- /// <returns>Taskオブジェクト</returns>
- public async Task LoadFileAsync(System.IO.StreamReader sr, System.Threading.CancellationTokenSource token)
- {
- await this.Document.LoadAsync(sr, token);
- }
-
- /// <summary>
- /// ドキュメントの内容をファイルに保存する
- /// </summary>
- /// <param name="sw">StreamWriter</param>
- /// <param name="token">キャンセル用トークン</param>
- /// <returns>Taskオブジェクト</returns>
- public async Task SaveFile(System.IO.StreamWriter sw, System.Threading.CancellationTokenSource token)
- {
- await this.Document.SaveAsync(sw, token);
- }
-
- #region command
- void CopyCommand()
- {
- this.Copy();
- }
-
- void CutCommand()
- {
- this.Cut();
- this.Refresh();
- }
-
- async Task PasteCommand()
- {
- await this.PasteAsync();
- this.Refresh();
- }
-
- #endregion
-
- #region event
- /// <inheritdoc/>
- protected override Windows.UI.Xaml.Automation.Peers.AutomationPeer OnCreateAutomationPeer()
- {
- this.peer = new FooTextBoxAutomationPeer(this);
- return this.peer;
- }
-
- /// <inheritdoc/>
- protected override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- Grid grid = this.GetTemplateChild("PART_Grid") as Grid;
- if (grid != null)
- {
- Grid.SetRow(this.rectangle, 0);
- Grid.SetColumn(this.rectangle, 0);
- grid.Children.Add(this.rectangle);
- }
-
- this.horizontalScrollBar = this.GetTemplateChild("PART_HorizontalScrollBar") as ScrollBar;
- if (this.horizontalScrollBar != null)
- {
- this.horizontalScrollBar.SmallChange = 10;
- this.horizontalScrollBar.LargeChange = 100;
- this.horizontalScrollBar.Maximum = this.horizontalScrollBar.LargeChange + 1;
- this.horizontalScrollBar.Scroll += new ScrollEventHandler(horizontalScrollBar_Scroll);
- }
- this.verticalScrollBar = this.GetTemplateChild("PART_VerticalScrollBar") as ScrollBar;
- if (this.verticalScrollBar != null)
- {
- this.verticalScrollBar.SmallChange = 1;
- this.verticalScrollBar.LargeChange = 10;
- this.verticalScrollBar.Maximum = this.View.LayoutLines.Count;
- this.verticalScrollBar.Scroll += new ScrollEventHandler(verticalScrollBar_Scroll);
- }
- }
-
- /// <inheritdoc/>
- protected override void OnGotFocus(RoutedEventArgs e)
- {
- base.OnGotFocus(e);
- this.textStore.SetFocus();
- this.View.IsFocused = true;
- this.Refresh();
- }
-
- /// <inheritdoc/>
- protected override void OnLostFocus(RoutedEventArgs e)
- {
- base.OnLostFocus(e);
- this.View.IsFocused = false;
- this.Refresh();
- }
-
- /// <inheritdoc/>
- protected override async void OnKeyDown(KeyRoutedEventArgs e)
- {
- bool isControlPressed = this.IsModiferKeyPressed(VirtualKey.Control);
- bool isShiftPressed = this.IsModiferKeyPressed(VirtualKey.Shift);
- bool isMovedCaret = false;
- switch (e.Key)
- {
- case VirtualKey.Up:
- this._Controller.MoveCaretVertical(-1, isShiftPressed);
- this.Refresh();
- e.Handled = true;
- isMovedCaret = true;
- break;
- case VirtualKey.Down:
- this._Controller.MoveCaretVertical(+1, isShiftPressed);
- this.Refresh();
- e.Handled = true;
- isMovedCaret = true;
- break;
- case VirtualKey.Left:
- this._Controller.MoveCaretHorizontical(-1, isShiftPressed, isControlPressed);
- this.Refresh();
- e.Handled = true;
- isMovedCaret = true;
- break;
- case VirtualKey.Right:
- this._Controller.MoveCaretHorizontical(1, isShiftPressed, isControlPressed);
- this.Refresh();
- e.Handled = true;
- isMovedCaret = true;
- break;
- case VirtualKey.PageUp:
- this._Controller.Scroll(ScrollDirection.Up, this.View.LineCountOnScreen, isShiftPressed, true);
- this.Refresh();
- isMovedCaret = true;
- break;
- case VirtualKey.PageDown:
- this._Controller.Scroll(ScrollDirection.Down, this.View.LineCountOnScreen, isShiftPressed, true);
- this.Refresh();
- isMovedCaret = true;
- break;
- case VirtualKey.Home:
- if (isControlPressed)
- this._Controller.JumpToHead(isShiftPressed);
- else
- this.Controller.JumpToLineHead(this.Document.CaretPostion.row,isShiftPressed);
- this.Refresh();
- isMovedCaret = true;
- break;
- case VirtualKey.End:
- if (isControlPressed)
- this._Controller.JumpToEnd(isShiftPressed);
- else
- this.Controller.JumpToLineEnd(this.Document.CaretPostion.row,isShiftPressed);
- this.Refresh();
- isMovedCaret = true;
- break;
- case VirtualKey.Tab:
- if (!isControlPressed)
- {
- if (this._Controller.SelectionLength == 0)
- this._Controller.DoInputChar('\t');
- else if (isShiftPressed)
- this._Controller.DownIndent();
- else
- this._Controller.UpIndent();
- this.Refresh();
- e.Handled = true;
- }
- break;
- case VirtualKey.Enter:
- this._Controller.DoEnterAction();
- this.Refresh();
- e.Handled = true;
- break;
- case VirtualKey.Insert:
- if(this.View.InsertMode)
- this.View.InsertMode = false;
- else
- this.View.InsertMode = true;
- this.Refresh();
- e.Handled = true;
- break;
- case VirtualKey.A:
- if (isControlPressed)
- {
- this.SelectAll();
- this.Refresh();
- e.Handled = true;
- }
- break;
- case VirtualKey.B:
- if (isControlPressed)
- {
- if (this._Controller.RectSelection)
- this._Controller.RectSelection = false;
- else
- this._Controller.RectSelection = true;
- this.Refresh();
- e.Handled = true;
- }
- break;
- case VirtualKey.C:
- if (isControlPressed)
- {
- this.CopyCommand();
- e.Handled = true;
- }
- break;
- case VirtualKey.X:
- if (isControlPressed)
- {
- this.CutCommand();
- e.Handled = true;
- }
- break;
- case VirtualKey.V:
- if (isControlPressed)
- {
- await this.PasteCommand();
- e.Handled = true;
- }
- break;
- case VirtualKey.Y:
- if (isControlPressed)
- {
- this.Document.UndoManager.redo();
- this.Refresh();
- e.Handled = true;
- }
- break;
- case VirtualKey.Z:
- if (isControlPressed)
- {
- this.Document.UndoManager.undo();
- this.Refresh();
- e.Handled = true;
- }
- break;
- case VirtualKey.Back:
- this._Controller.DoBackSpaceAction();
- this.Refresh();
- e.Handled = true;
- break;
- case VirtualKey.Delete:
- this._Controller.DoDeleteAction();
- this.Refresh();
- e.Handled = true;
- break;
- }
- if (isMovedCaret && this.peer != null)
- this.peer.OnNotifyCaretChanged();
- base.OnKeyDown(e);
- }
-
- /// <inheritdoc/>
- protected override void OnPointerPressed(PointerRoutedEventArgs e)
- {
- this.CapturePointer(e.Pointer);
- this.gestureRecongnizer.ProcessDownEvent(e.GetCurrentPoint(this));
- e.Handled = true;
- }
-
- /// <inheritdoc/>
- protected override void OnPointerMoved(PointerRoutedEventArgs e)
- {
- this.gestureRecongnizer.ProcessMoveEvents(e.GetIntermediatePoints(this));
- e.Handled = true;
-
- if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse)
- {
- Point p = e.GetCurrentPoint(this).Position;
- if (this.View.HitTextArea(p.X, p.Y))
- {
- TextPoint tp = this.View.GetTextPointFromPostion(p);
- if (this._Controller.IsMarker(tp, HilightType.Url))
- Window.Current.CoreWindow.PointerCursor = new CoreCursor(CoreCursorType.Hand, 101);
- else
- Window.Current.CoreWindow.PointerCursor = new CoreCursor(CoreCursorType.IBeam, 101);
- }
- else
- {
- Window.Current.CoreWindow.PointerCursor = new CoreCursor(CoreCursorType.Arrow, 101);
- }
- }
- }
-
- /// <inheritdoc/>
- protected override void OnPointerReleased(PointerRoutedEventArgs e)
- {
- this.gestureRecongnizer.ProcessUpEvent(e.GetCurrentPoint(this));
- e.Handled = true;
- }
-
- /// <inheritdoc/>
- protected override void OnPointerCanceled(PointerRoutedEventArgs e)
- {
- this.gestureRecongnizer.CompleteGesture();
- e.Handled = true;
- }
-
- /// <inheritdoc/>
- protected override void OnPointerWheelChanged(PointerRoutedEventArgs e)
- {
- bool shift = (e.KeyModifiers & Windows.System.VirtualKeyModifiers.Shift) ==
- Windows.System.VirtualKeyModifiers.Shift;
- bool ctrl = (e.KeyModifiers & Windows.System.VirtualKeyModifiers.Control) ==
- Windows.System.VirtualKeyModifiers.Control;
- this.gestureRecongnizer.ProcessMouseWheelEvent(e.GetCurrentPoint(this), shift, ctrl);
- e.Handled = true;
- }
-
- void CoreWindow_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
- {
- if (this.FocusState == FocusState.Unfocused || !this.IsEnabled)
- return;
- if (args.KeyCode >= 00 && args.KeyCode <= 0x1f)
- return;
- this._Controller.DoInputString(Char.ConvertFromUtf32((int)args.KeyCode));
- this.Refresh();
- }
-
- bool textStore_IsReadOnly()
- {
- return false;
- }
-
- bool textStore_IsLoading()
- {
- return false;
- }
-
- void textStore_CompositionEnded()
- {
- TextStoreHelper.EndCompostion(this.Document);
- this.Refresh();
- }
-
- void textStore_CompositionUpdated(int start, int end)
- {
- if (TextStoreHelper.ScrollToCompstionUpdated(this.textStore, this.View, start, end))
- this.Refresh();
- }
- bool textStore_CompositionStarted()
- {
- return TextStoreHelper.StartCompstion(this.Document);
- }
-
- string _textStore_GetString(int start, int length)
- {
- return this.Document.ToString(start, length);
- }
-
- void _textStore_GetStringExtent(
- int i_startIndex,
- int i_endIndex,
- out POINT o_topLeft,
- out POINT o_bottomRight
- )
- {
- Point startPos, endPos;
- TextStoreHelper.GetStringExtent(this.Document, this.View, i_startIndex, i_endIndex, out startPos, out endPos);
-
- double scale = Util.GetScale();
-
- //DIPを渡すと予測候補の位置がおかしくなるので、デバイス依存の座標に変換する
- var screenStartPos = Util.GetScreentPoint(startPos, this).Scale(scale);
- var screenEndPos = Util.GetScreentPoint(endPos, this).Scale(scale);
- o_topLeft = new POINT((int)(screenStartPos.X), (int)(screenStartPos.Y));
- o_bottomRight = new POINT((int)(screenEndPos.X), (int)(screenEndPos.Y));
- }
-
- void _textStore_GetScreenExtent(out POINT o_topLeft, out POINT o_bottomRight)
- {
- var pointTopLeft = new Point(0, 0);
- var pointBottomRight = new Point(this.RenderSize.Width, this.RenderSize.Height);
-
- var gt = this.TransformToVisual(Window.Current.Content);
- pointTopLeft = gt.TransformPoint(pointTopLeft);
- pointBottomRight = gt.TransformPoint(pointBottomRight);
-
- o_topLeft = new POINT((int)pointTopLeft.X, (int)pointTopLeft.Y);
- o_bottomRight = new POINT((int)pointBottomRight.X, (int)pointBottomRight.Y);
- }
-
- void _textStore_GetSelectionIndex(int start_index, int max_count, out DotNetTextStore.TextSelection[] sels)
- {
- TextRange selRange;
- TextStoreHelper.GetSelection(this._Controller, this.View.Selections, out selRange);
-
- sels = new DotNetTextStore.TextSelection[1];
- sels[0] = new DotNetTextStore.TextSelection();
- sels[0].start = selRange.Index;
- sels[0].end = selRange.Index + selRange.Length;
- }
-
- void _textStore_SetSelectionIndex(DotNetTextStore.TextSelection[] sels)
- {
- TextStoreHelper.SetSelectionIndex(this._Controller, this.View, sels[0].start, sels[0].end);
- this.Refresh();
- }
-
- void _textStore_InsertAtSelection(string i_value,ref int o_stratIndex,ref int o_endIndex)
- {
- TextStoreHelper.InsertTextAtSelection(this._Controller, i_value);
- this.Refresh();
- }
-
- void Controller_SelectionChanged(object sender, EventArgs e)
- {
- //こうしないと選択できなくなってしまう
- this.nowCaretMove = true;
- SetValue(SelectedTextProperty, this._Controller.SelectedText);
- SetValue(CaretPostionPropertyKey, this.Document.CaretPostion);
- this.nowCaretMove = false;
- if (this.textStore.IsLocked() == false)
- this.textStore.NotifySelectionChanged();
- }
-
- Gripper hittedGripper;
- void gestureRecongnizer_ManipulationStarted(GestureRecognizer sender, ManipulationStartedEventArgs e)
- {
- //Updateedの段階でヒットテストしてしまうとグリッパーを触ってもヒットしないことがある
- this.hittedGripper = this.View.HitGripperFromPoint(e.Position);
- }
-
- private void GestureRecongnizer_ManipulationInertiaStarting(GestureRecognizer sender, ManipulationInertiaStartingEventArgs args)
- {
- //sender.InertiaTranslationDeceleration = 0.001f;
- //sender.InertiaExpansionDeceleration = 100.0f * 96.0f / 1000.0f;
- //sender.InertiaRotationDeceleration = 720.0f / (1000.0f * 1000.0f);
- }
-
- void gestureRecongnizer_ManipulationUpdated(GestureRecognizer sender, ManipulationUpdatedEventArgs e)
- {
- if (this._Controller.MoveCaretAndGripper(e.Position, this.hittedGripper))
- {
- if (this.peer != null)
- this.peer.OnNotifyCaretChanged();
- this.Refresh();
- return;
- }
-
- if (e.Delta.Scale < 1)
- {
- double newSize = this.Render.FontSize - 1;
- if (newSize < 1)
- newSize = 1;
- this.Render.FontSize = newSize;
- this.Refresh();
- SetValue(MagnificationPowerPropertyKey, this.Render.FontSize / this.FontSize);
- return;
- }
-
- if (e.Delta.Scale > 1)
- {
- double newSize = this.Render.FontSize + 1;
- if (newSize > 72)
- newSize = 72;
- this.Render.FontSize = newSize;
- this.Refresh();
- SetValue(MagnificationPowerPropertyKey, this.Render.FontSize / this.FontSize);
- return;
- }
-
- Point translation = e.Delta.Translation;
-
- //Xの絶対値が大きければ横方向のスクロールで、そうでなければ縦方向らしい
- if (Math.Abs(e.Cumulative.Translation.X) < Math.Abs(e.Cumulative.Translation.Y))
- {
- int deltay = (int)Math.Abs(Math.Ceiling(translation.Y));
- if (translation.Y < 0)
- this._Controller.ScrollByPixel(ScrollDirection.Down, deltay, false, false);
- else
- this._Controller.ScrollByPixel(ScrollDirection.Up, deltay, false, false);
- this.Refresh();
- return;
- }
-
- int deltax = (int)Math.Abs(Math.Ceiling(translation.X));
- if (deltax != 0)
- {
- if (translation.X < 0)
- this._Controller.Scroll(ScrollDirection.Left, deltax, false, false);
- else
- this._Controller.Scroll(ScrollDirection.Right, deltax, false, false);
- this.Refresh();
- }
- }
-
- void gestureRecongnizer_ManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs e)
- {
- }
-
- async void gestureRecongnizer_RightTapped(GestureRecognizer sender, RightTappedEventArgs e)
- {
- ResourceMap map = ResourceManager.Current.MainResourceMap.GetSubtree("FooEditEngine.Metro/Resources");
- ResourceContext context = ResourceContext.GetForCurrentView();
- if (this.View.HitTextArea(e.Position.X, e.Position.Y))
- {
- FooContextMenuEventArgs args = new FooContextMenuEventArgs(e.Position);
- if (this.ContextMenuOpening != null)
- this.ContextMenuOpening(this, args);
- if (!args.Handled)
- {
- PopupMenu ContextMenu = new PopupMenu();
- ContextMenu.Commands.Add(new UICommand(map.GetValue("CopyMenuName", context).ValueAsString, (command) =>
- {
- this.CopyCommand();
- }));
- ContextMenu.Commands.Add(new UICommand(map.GetValue("CutMenuName", context).ValueAsString, (command) =>
- {
- this.CutCommand();
- }));
- ContextMenu.Commands.Add(new UICommand(map.GetValue("PasteMenuName", context).ValueAsString, async (command) =>
- {
- await this.PasteCommand();
- }));
- if (this._Controller.RectSelection)
- {
- ContextMenu.Commands.Add(new UICommand(map.GetValue("LineSelectMenuName", context).ValueAsString, (command) =>
- {
- this._Controller.RectSelection = false;
- }));
- }
- else
- {
- ContextMenu.Commands.Add(new UICommand(map.GetValue("RectSelectMenuName", context).ValueAsString, (command) =>
- {
- this._Controller.RectSelection = true;
- }));
- }
- await ContextMenu.ShowAsync(Util.GetScreentPoint(e.Position,this));
- }
- }
- }
-
- void gestureRecongnizer_Tapped(GestureRecognizer sender, TappedEventArgs e)
- {
- bool touched = e.PointerDeviceType == PointerDeviceType.Touch;
- this.Document.SelectGrippers.BottomLeft.Enabled = false;
- this.Document.SelectGrippers.BottomRight.Enabled = touched;
- this.JumpCaret(e.Position);
- System.Diagnostics.Debug.WriteLine(e.TapCount);
- if (e.TapCount == 2)
- {
- this.Document.SelectGrippers.BottomLeft.Enabled = touched;
- //タッチスクリーンでダブルタップした場合、アンカーインデックスを単語の先頭にしないとバグる
- this.Document.SelectWord(this.Controller.SelectionStart, touched);
- this.Refresh();
- }
- }
-
- void JumpCaret(Point p)
- {
- TextPoint tp = this.View.GetTextPointFromPostion(p);
- if (tp == TextPoint.Null)
- return;
-
- int index = this.View.LayoutLines.GetIndexFromTextPoint(tp);
-
- FoldingItem foldingData = this.View.HitFoldingData(p.X, tp.row);
- if (foldingData != null)
- {
- if (foldingData.Expand)
- this.View.LayoutLines.FoldingCollection.Collapse(foldingData);
- else
- this.View.LayoutLines.FoldingCollection.Expand(foldingData);
- this._Controller.JumpCaret(foldingData.Start, false);
- }
- else
- {
- this._Controller.JumpCaret(tp.row, tp.col, false);
- }
- if (this.peer != null)
- this.peer.OnNotifyCaretChanged();
- this.View.IsFocused = true;
- this.Focus(FocusState.Programmatic);
- this.Refresh();
- }
-
- void gestureRecongnizer_Dragging(GestureRecognizer sender, DraggingEventArgs e)
- {
- Point p = e.Position;
- TextPointSearchRange searchRange;
- if (this.View.HitTextArea(p.X, p.Y))
- searchRange = TextPointSearchRange.TextAreaOnly;
- else if (this._Controller.SelectionLength > 0)
- searchRange = TextPointSearchRange.Full;
- else
- return;
- TextPoint tp = this.View.GetTextPointFromPostion(p, searchRange);
- this._Controller.MoveCaretAndSelect(tp);
- if (this.peer != null)
- this.peer.OnNotifyCaretChanged();
- this.Refresh();
- }
-
- bool IsModiferKeyPressed(VirtualKey key)
- {
- CoreVirtualKeyStates state = Window.Current.CoreWindow.GetKeyState(key);
- return (state & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down;
- }
- void Refresh(Rectangle updateRect)
- {
- if (this.rectangle.ActualWidth == 0 || this.rectangle.ActualHeight == 0 || this.Visibility == Windows.UI.Xaml.Visibility.Collapsed)
- return;
-
- this.Render.DrawContent(this.View, this.IsEnabled, updateRect);
- }
-
-
- bool Resize(double width, double height)
- {
- if (width == 0 || height == 0)
- throw new ArgumentOutOfRangeException();
- if (this.Render.Resize(this.rectangle, width, height))
- {
- this.View.PageBound = new Rectangle(0, 0, width, height);
-
- if (this.horizontalScrollBar != null)
- {
- this.horizontalScrollBar.LargeChange = this.View.PageBound.Width;
- this.horizontalScrollBar.Maximum = this.View.LongestWidth + this.horizontalScrollBar.LargeChange + 1;
- }
- if (this.verticalScrollBar != null)
- {
- this.verticalScrollBar.LargeChange = this.View.LineCountOnScreen;
- this.verticalScrollBar.Maximum = this.View.LayoutLines.Count + this.verticalScrollBar.LargeChange + 1;
- }
- return true;
- }
- return false;
- }
-
- void View_SrcChanged(object sender, EventArgs e)
- {
- if (this.horizontalScrollBar == null || this.verticalScrollBar == null)
- return;
- EditView view = this.View;
- if (view.Src.Row > this.verticalScrollBar.Maximum)
- this.verticalScrollBar.Maximum = view.Src.Row + view.LineCountOnScreen + 1;
- double absoulteX = Math.Abs(view.Src.X);
- if (absoulteX > this.horizontalScrollBar.Maximum)
- this.horizontalScrollBar.Maximum = absoulteX + view.PageBound.Width + 1;
- if (view.Src.Row != this.verticalScrollBar.Value)
- this.verticalScrollBar.Value = view.Src.Row;
- if (view.Src.X != this.horizontalScrollBar.Value)
- this.horizontalScrollBar.Value = Math.Abs(view.Src.X);
- }
-
- void FooTextBox_SizeChanged(object sender, SizeChangedEventArgs e)
- {
- if (this.Resize(this.rectangle.ActualWidth, this.rectangle.ActualHeight))
- {
- this.Refresh();
- return;
- }
- }
-
- void horizontalScrollBar_Scroll(object sender, ScrollEventArgs e)
- {
- if (this.horizontalScrollBar == null)
- return;
- double toX;
- if (this.FlowDirection == FlowDirection.LeftToRight)
- toX = this.horizontalScrollBar.Value;
- else
- toX = -this.horizontalScrollBar.Value;
- this._Controller.Scroll(toX, this.View.Src.Row, false, false);
- this.Refresh();
- }
-
- void verticalScrollBar_Scroll(object sender, ScrollEventArgs e)
- {
- if (this.verticalScrollBar == null)
- return;
- int newRow = (int)this.verticalScrollBar.Value;
- if (newRow >= this.View.LayoutLines.Count)
- return;
- this._Controller.Scroll(this.View.Src.X, newRow, false, false);
- this.Refresh();
- }
-
- void Document_Update(object sender, DocumentUpdateEventArgs e)
- {
- if (this.textStore.IsLocked())
- return;
- if (e.type == UpdateType.Replace)
- TextStoreHelper.NotifyTextChanged(this.textStore, e.startIndex, e.removeLength, e.insertLength);
- if(this.peer != null)
- this.peer.OnNotifyTextChanged();
- }
-
- void FooTextBox_Loaded(object sender, RoutedEventArgs e)
- {
- this.Focus(FocusState.Programmatic);
- }
-
- void timer_Tick(object sender, object e)
- {
- if (this.View.LayoutLines.HilightAll() || this.View.LayoutLines.GenerateFolding())
- this.Refresh(this.View.PageBound);
- }
-
- /// <inheritdoc/>
- public static void OnPropertyChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- FooTextBox source = (FooTextBox)sender;
- if(e.Property.Equals(SelectedTextProperty) && !source.nowCaretMove)
- source._Controller.SelectedText = source.SelectedText;
- if(e.Property.Equals(HilighterProperty))
- source.View.Hilighter = source.Hilighter;
- if (e.Property.Equals(TextAntialiasModeProperty))
- source.Render.TextAntialiasMode = source.TextAntialiasMode;
- if (e.Property.Equals(FoldingStrategyProperty))
- source.View.LayoutLines.FoldingStrategy = source.FoldingStrategy;
- if (e.Property.Equals(IndentModeProperty))
- source.Controller.IndentMode = source.IndentMode;
- if (e.Property.Equals(SelectionProperty) && !source.nowCaretMove)
- source.Document.Select(source.Selection.Index,source.Selection.Length);
- if (e.Property.Equals(CaretPostionPropertyKey) && !source.nowCaretMove)
- source.JumpCaret(source.CaretPostion.row, source.CaretPostion.col);
- if (e.Property.Equals(InsertModeProperty))
- source.View.InsertMode = source.InsertMode;
- if (e.Property.Equals(TabCharsProperty))
- source.Document.TabStops = source.TabChars;
- if (e.Property.Equals(RectSelectModeProperty))
- source._Controller.RectSelection = source.RectSelectMode;
- if (e.Property.Equals(DrawCaretProperty))
- source.View.HideCaret = !source.DrawCaret;
- if (e.Property.Equals(DrawCaretLineProperty))
- source.View.HideLineMarker = !source.DrawCaretLine;
- if (e.Property.Equals(DrawLineNumberProperty))
- source.Document.DrawLineNumber = source.DrawLineNumber;
- if(e.Property.Equals(MagnificationPowerPropertyKey))
- source.Render.FontSize = source.FontSize * source.MagnificationPower;
- if (e.Property.Equals(FontFamilyProperty))
- source.Render.FontFamily = source.FontFamily;
- if (e.Property.Equals(FontStyleProperty))
- source.Render.FontStyle = source.FontStyle;
- if (e.Property.Equals(FontWeightProperty))
- source.Render.FontWeigth = source.FontWeight;
- if (e.Property.Equals(FontSizeProperty))
- source.Render.FontSize = source.FontSize;
- if (e.Property.Equals(ForegroundProperty))
- source.Render.Foreground = D2DRenderBase.ToColor4(source.Foreground);
- if (e.Property.Equals(BackgroundProperty))
- source.Render.Background = D2DRenderBase.ToColor4(source.Background);
- if (e.Property.Equals(ControlCharProperty))
- source.Render.ControlChar = D2DRenderBase.ToColor4(source.ControlChar);
- if (e.Property.Equals(HilightProperty))
- source.Render.Hilight = D2DRenderBase.ToColor4(source.Hilight);
- if (e.Property.Equals(Keyword1Property))
- source.Render.Keyword1 = D2DRenderBase.ToColor4(source.Keyword1);
- if (e.Property.Equals(Keyword2Property))
- source.Render.Keyword2 = D2DRenderBase.ToColor4(source.Keyword2);
- if (e.Property.Equals(CommentProperty))
- source.Render.Comment = D2DRenderBase.ToColor4(source.Comment);
- if (e.Property.Equals(LiteralProperty))
- source.Render.Literal = D2DRenderBase.ToColor4(source.Literal);
- if (e.Property.Equals(URLProperty))
- source.Render.Url = D2DRenderBase.ToColor4(source.URL);
- if (e.Property.Equals(InsertCaretProperty))
- source.Render.InsertCaret = D2DRenderBase.ToColor4(source.InsertCaret);
- if (e.Property.Equals(OverwriteCaretProperty))
- source.Render.OverwriteCaret = D2DRenderBase.ToColor4(source.OverwriteCaret);
- if (e.Property.Equals(PaddingProperty))
- source.View.Padding = new Padding((int)source.Padding.Left, (int)source.Padding.Top, (int)source.Padding.Right, (int)source.Padding.Bottom);
- if (e.Property.Equals(LineMarkerProperty))
- source.Render.LineMarker = D2DRenderBase.ToColor4(source.LineMarker);
- if (e.Property.Equals(MarkURLProperty))
- source.Document.UrlMark = source.MarkURL;
- if (e.Property.Equals(ShowFullSpaceProperty))
- source.Render.ShowFullSpace = source.ShowFullSpace;
- if (e.Property.Equals(ShowHalfSpaceProperty))
- source.Render.ShowHalfSpace = source.ShowHalfSpace;
- if (e.Property.Equals(ShowTabProperty))
- source.Render.ShowTab = source.ShowTab;
- if (e.Property.Equals(ShowLineBreakProperty))
- source.Render.ShowLineBreak = source.ShowLineBreak;
- if (e.Property.Equals(LineBreakProperty))
- source.Document.LineBreak = source.LineBreakMethod;
- if (e.Property.Equals(LineBreakCharCountProperty))
- source.Document.LineBreakCharCount = source.LineBreakCharCount;
- if (e.Property.Equals(UpdateAreaProperty))
- source.Render.UpdateArea = D2DRenderBase.ToColor4(source.UpdateArea);
- if (e.Property.Equals(LineNumberProperty))
- source.Render.LineNumber = D2DRenderBase.ToColor4(source.LineNumber);
- if (e.Property.Equals(FlowDirectionProperty))
- {
- source.Document.RightToLeft = source.FlowDirection == Windows.UI.Xaml.FlowDirection.RightToLeft;
- if(source.horizontalScrollBar != null)
- source.horizontalScrollBar.FlowDirection = source.FlowDirection;
- }
- if (e.Property.Equals(DrawRulerProperty))
- {
- source.Document.HideRuler = !source.DrawRuler;
- source._Controller.JumpCaret(source.Document.CaretPostion.row, source.Document.CaretPostion.col);
- }
- }
- #endregion
-
- #region event
-
- /// <summary>
- /// コンテキストメニューが表示されるときに呼び出されます
- /// </summary>
- public event EventHandler<FooContextMenuEventArgs> ContextMenuOpening;
-
- #endregion
-
- #region property
-
- internal Controller Controller
- {
- get
- {
- return this._Controller;
- }
- }
-
- /// <summary>
- /// 文字列の描写に使用されるアンチエイリアシング モードを表します
- /// </summary>
- public TextAntialiasMode TextAntialiasMode
- {
- get { return (TextAntialiasMode)GetValue(TextAntialiasModeProperty); }
- set { SetValue(TextAntialiasModeProperty, value); }
- }
-
- /// <summary>
- /// TextAntialiasModeの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty TextAntialiasModeProperty =
- DependencyProperty.Register("TextAntialiasMode", typeof(TextAntialiasMode), typeof(FooTextBox), new PropertyMetadata(TextAntialiasMode.Default, OnPropertyChanged));
-
- /// <summary>
- /// シンタックスハイライターを表す
- /// </summary>
- public IHilighter Hilighter
- {
- get { return (IHilighter)GetValue(HilighterProperty); }
- set { SetValue(HilighterProperty, value); }
- }
-
- /// <summary>
- /// Hilighterの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty HilighterProperty =
- DependencyProperty.Register("Hilighter", typeof(IHilighter), typeof(FooTextBox), new PropertyMetadata(null, OnPropertyChanged));
-
- /// <summary>
- /// フォールティングを作成するインターフェイスを表す
- /// </summary>
- public IFoldingStrategy FoldingStrategy
- {
- get { return (IFoldingStrategy)GetValue(FoldingStrategyProperty); }
- set { SetValue(FoldingStrategyProperty, value); }
- }
-
- /// <summary>
- /// FoldingStrategyの依存プロパティ
- /// </summary>
- public static readonly DependencyProperty FoldingStrategyProperty =
- DependencyProperty.Register("FoldingStrategy", typeof(IFoldingStrategy), typeof(FooTextBox), new PropertyMetadata(null,OnPropertyChanged));
-
- /// <summary>
- /// マーカーパターンセットを表す
- /// </summary>
- public MarkerPatternSet MarkerPatternSet
- {
- get
- {
- return this.Document.MarkerPatternSet;
- }
- }
-
- /// <summary>
- /// ドキュメントを表す
- /// </summary>
- public Document Document
- {
- get
- {
- return this._Document;
- }
- set
- {
- Document old_doc = this._Document;
- int oldLength = 0;
- if (this._Document != null)
- {
- old_doc.Update -= new DocumentUpdateEventHandler(Document_Update);
- old_doc.LoadProgress -= _Document_LoadProgress;
- oldLength = old_doc.Length;
- }
-
- this._Document = value;
- this._Document.LayoutLines.Render = this.Render;
- this._Document.Update += new DocumentUpdateEventHandler(Document_Update);
- this._Document.LoadProgress += _Document_LoadProgress;
- //初期化が終わっていればすべて存在する
- if (this.Controller != null && this.View != null && this.textStore != null)
- {
- this.Controller.Document = value;
- this.View.Document = value;
- this.Controller.AdjustCaret();
- this.textStore.NotifyTextChanged(oldLength, value.Length);
-
- //依存プロパティとドキュメント内容が食い違っているので再設定する
- this.ShowFullSpace = value.ShowFullSpace;
- this.ShowHalfSpace = value.ShowHalfSpace;
- this.ShowLineBreak = value.ShowLineBreak;
- this.ShowTab = value.ShowTab;
- this.FlowDirection = value.RightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
- this.IndentMode = value.IndentMode;
- this.DrawCaretLine = !value.HideLineMarker;
- this.InsertMode = value.InsertMode;
- this.DrawRuler = !value.HideRuler;
- this.DrawLineNumber = value.DrawLineNumber;
- this.MarkURL = value.UrlMark;
- this.LineBreakMethod = value.LineBreak;
- this.LineBreakCharCount = value.LineBreakCharCount;
- this.TabChars = value.TabStops;
-
- this.Refresh();
- }
- }
- }
-
- private void _Document_LoadProgress(object sender, ProgressEventArgs e)
- {
- if(e.state == ProgressState.Start)
- this.IsEnabled = false;
- else if(e.state == ProgressState.Complete)
- {
- TextStoreHelper.NotifyTextChanged(this.textStore, 0, 0, this.Document.Length);
- if (this.verticalScrollBar != null)
- this.verticalScrollBar.Maximum = this.View.LayoutLines.Count;
- this.View.CalculateLineCountOnScreen();
- this.IsEnabled = true;
- }
- }
-
- /// <summary>
- /// レイアウト行を表す
- /// </summary>
- public LineToIndexTable LayoutLineCollection
- {
- get { return this.View.LayoutLines; }
- }
-
- /// <summary>
- /// 選択中の文字列を表す
- /// </summary>
- public string SelectedText
- {
- get { return (string)GetValue(SelectedTextProperty); }
- set { SetValue(SelectedTextProperty, value); }
- }
-
- /// <summary>
- /// SelectedTextの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty SelectedTextProperty =
- DependencyProperty.Register("SelectedText", typeof(string), typeof(FooTextBox), new PropertyMetadata(null, OnPropertyChanged));
-
- /// <summary>
- /// インデントの方法を表す
- /// </summary>
- public IndentMode IndentMode
- {
- get { return (IndentMode)GetValue(IndentModeProperty); }
- set { SetValue(IndentModeProperty, value); }
- }
-
- /// <summary>
- /// IndentModeの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty IndentModeProperty =
- DependencyProperty.Register("IndentMode", typeof(IndentMode), typeof(FooTextBox), new PropertyMetadata(IndentMode.Tab,OnPropertyChanged));
-
- /// <summary>
- /// 選択範囲を表す
- /// </summary>
- /// <remarks>
- /// Lengthが0の場合はキャレット位置を表します。
- /// 矩形選択モードの場合、選択範囲の文字数ではなく、開始位置から終了位置までの長さとなります
- /// </remarks>
- public TextRange Selection
- {
- get { return (TextRange)GetValue(SelectionProperty); }
- set { SetValue(SelectionProperty, value); }
- }
-
- /// <summary>
- /// Selectionの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty SelectionProperty =
- DependencyProperty.Register("Selection", typeof(TextRange), typeof(FooTextBox), new PropertyMetadata(TextRange.Null, OnPropertyChanged));
-
- /// <summary>
- /// 拡大率を表す
- /// </summary>
- public double MagnificationPower
- {
- get { return (double)GetValue(MagnificationPowerPropertyKey); }
- set { SetValue(MagnificationPowerPropertyKey, value); }
- }
-
- /// <summary>
- /// 拡大率を表す依存プロパティ
- /// </summary>
- public static readonly DependencyProperty MagnificationPowerPropertyKey =
- DependencyProperty.Register("MagnificationPower", typeof(double), typeof(FooTextBox), new PropertyMetadata(1.0, OnPropertyChanged));
-
- /// <summary>
- /// キャレット位置を表す
- /// </summary>
- public TextPoint CaretPostion
- {
- get { return (TextPoint)GetValue(CaretPostionPropertyKey); }
- set { SetValue(CaretPostionPropertyKey, value); }
- }
-
- static readonly DependencyProperty CaretPostionPropertyKey =
- DependencyProperty.Register("CaretPostion", typeof(TextPoint), typeof(FooTextBox), new PropertyMetadata(new TextPoint(), OnPropertyChanged));
-
- /// <summary>
- /// レタリング方向を表す
- /// </summary>
- public new FlowDirection FlowDirection
- {
- get { return (FlowDirection)GetValue(FlowDirectionProperty); }
- set { SetValue(FlowDirectionProperty, value); }
- }
-
- /// <summary>
- /// レタリング方向を表す。これは依存プロパティです
- /// </summary>
- public new static readonly DependencyProperty FlowDirectionProperty =
- DependencyProperty.Register("FlowDirection", typeof(FlowDirection), typeof(FooTextBox), new PropertyMetadata(FlowDirection.LeftToRight,OnPropertyChanged));
-
- /// <summary>
- /// フォントファミリーを表す
- /// </summary>
- public new FontFamily FontFamily
- {
- get { return (FontFamily)GetValue(FontFamilyProperty); }
- set { SetValue(FontFamilyProperty, value); }
- }
-
- /// <summary>
- /// FontFamilyの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty FontFamilyProperty =
- DependencyProperty.Register("FontFamily", typeof(FontFamily), typeof(FooTextBox), new PropertyMetadata(new FontFamily("Cambria"), OnPropertyChanged));
-
- /// <summary>
- /// フォントサイズを表す
- /// </summary>
- public new double FontSize
- {
- get { return (double)GetValue(FontSizeProperty); }
- set { SetValue(FontSizeProperty, value); }
- }
-
- /// <summary>
- /// FontSizeの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty FontSizeProperty =
- DependencyProperty.Register("FontSize", typeof(double), typeof(FooTextBox), new PropertyMetadata(12.0,OnPropertyChanged));
-
- /// <summary>
- /// フォントスタイルを表す
- /// </summary>
- public new FontStyle FontStyle
- {
- get { return (FontStyle)GetValue(FontStyleProperty); }
- set { SetValue(FontStyleProperty, value); }
- }
-
- /// <summary>
- /// FontStyleの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty FontStyleProperty =
- DependencyProperty.Register("FontStyle", typeof(FontStyle), typeof(FooTextBox), new PropertyMetadata(FontStyle.Normal,OnPropertyChanged));
-
- /// <summary>
- /// フォントの幅を表す
- /// </summary>
- public new FontWeight FontWeight
- {
- get { return (FontWeight)GetValue(FontWeightProperty); }
- set { SetValue(FontWeightProperty, value); }
- }
-
- /// <summary>
- /// FontWeigthの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty FontWeightProperty =
- DependencyProperty.Register("FontWeigth", typeof(FontWeight), typeof(FooTextBox), new PropertyMetadata(FontWeights.Normal,OnPropertyChanged));
-
- /// <summary>
- /// デフォルトの文字色を表す。これは依存プロパティです
- /// </summary>
- public new Windows.UI.Color Foreground
- {
- get { return (Windows.UI.Color)GetValue(ForegroundProperty); }
- set { SetValue(ForegroundProperty, value); }
- }
-
- /// <summary>
- /// Foregroundの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty ForegroundProperty =
- DependencyProperty.Register("Foreground", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Black, OnPropertyChanged));
-
- /// <summary>
- /// 背景色を表す。これは依存プロパティです
- /// </summary>
- public new Windows.UI.Color Background
- {
- get { return (Windows.UI.Color)GetValue(BackgroundProperty); }
- set { SetValue(BackgroundProperty, value); }
- }
-
- /// <summary>
- /// Backgroundの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty BackgroundProperty =
- DependencyProperty.Register("Background", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.White, OnPropertyChanged));
-
- /// <summary>
- /// コントロールコードの文字色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color ControlChar
- {
- get { return (Windows.UI.Color)GetValue(ControlCharProperty); }
- set { SetValue(ControlCharProperty, value); }
- }
-
- /// <summary>
- /// ControlCharの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty ControlCharProperty =
- DependencyProperty.Register("ControlChar", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Gray, OnPropertyChanged));
-
- /// <summary>
- /// 選択時の背景色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color Hilight
- {
- get { return (Windows.UI.Color)GetValue(HilightProperty); }
- set { SetValue(HilightProperty, value); }
- }
-
- /// <summary>
- /// Hilightの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty HilightProperty =
- DependencyProperty.Register("Hilight", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.DeepSkyBlue, OnPropertyChanged));
-
- /// <summary>
- /// キーワード1の文字色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color Keyword1
- {
- get { return (Windows.UI.Color)GetValue(Keyword1Property); }
- set { SetValue(Keyword1Property, value); }
- }
-
- /// <summary>
- /// Keyword1の依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty Keyword1Property =
- DependencyProperty.Register("Keyword1", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Blue, OnPropertyChanged));
-
- /// <summary>
- /// キーワード2の文字色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color Keyword2
- {
- get { return (Windows.UI.Color)GetValue(Keyword2Property); }
- set { SetValue(Keyword2Property, value); }
- }
-
- /// <summary>
- /// Keyword2の依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty Keyword2Property =
- DependencyProperty.Register("Keyword2", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.DarkCyan, OnPropertyChanged));
-
- /// <summary>
- /// コメントの文字色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color Comment
- {
- get { return (Windows.UI.Color)GetValue(CommentProperty); }
- set { SetValue(CommentProperty, value); }
- }
-
- /// <summary>
- /// Commentの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty CommentProperty =
- DependencyProperty.Register("Comment", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Green, OnPropertyChanged));
-
- /// <summary>
- /// 文字リテラルの文字色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color Literal
- {
- get { return (Windows.UI.Color)GetValue(LiteralProperty); }
- set { SetValue(LiteralProperty, value); }
- }
-
- /// <summary>
- /// Literalの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty LiteralProperty =
- DependencyProperty.Register("Literal", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Brown, OnPropertyChanged));
-
- /// <summary>
- /// URLの文字色を表す。これは依存プロパティです
- /// </summary>
- public Windows.UI.Color URL
- {
- get { return (Windows.UI.Color)GetValue(URLProperty); }
- set { SetValue(URLProperty, value); }
- }
-
- /// <summary>
- /// URLの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty URLProperty =
- DependencyProperty.Register("URL", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Blue, OnPropertyChanged));
-
- /// <summary>
- /// 行更新フラグの色を表す
- /// </summary>
- public Windows.UI.Color UpdateArea
- {
- get { return (Windows.UI.Color)GetValue(UpdateAreaProperty); }
- set { SetValue(UpdateAreaProperty, value); }
- }
-
- /// <summary>
- /// UpdateAreaの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty UpdateAreaProperty =
- DependencyProperty.Register("UpdateArea", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.MediumSeaGreen, OnPropertyChanged));
-
- /// <summary>
- /// ラインマーカーの色を表す
- /// </summary>
- public Windows.UI.Color LineMarker
- {
- get { return (Windows.UI.Color)GetValue(LineMarkerProperty); }
- set { SetValue(LineMarkerProperty, value); }
- }
-
- /// <summary>
- /// LineMarkerの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty LineMarkerProperty =
- DependencyProperty.Register("LineMarker", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Gray, OnPropertyChanged));
-
- /// <summary>
- /// 挿入モード時のキャレットの色を表す
- /// </summary>
- public Windows.UI.Color InsertCaret
- {
- get { return (Windows.UI.Color)GetValue(InsertCaretProperty); }
- set { SetValue(InsertCaretProperty, value); }
- }
-
- /// <summary>
- /// InsertCaretの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty InsertCaretProperty =
- DependencyProperty.Register("InsertCaret", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Black, OnPropertyChanged));
-
- /// <summary>
- /// 上書きモード時のキャレット職を表す
- /// </summary>
- public Windows.UI.Color OverwriteCaret
- {
- get { return (Windows.UI.Color)GetValue(OverwriteCaretProperty); }
- set { SetValue(OverwriteCaretProperty, value); }
- }
-
- /// <summary>
- /// OverwriteCaretの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty OverwriteCaretProperty =
- DependencyProperty.Register("OverwriteCaret", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Black, OnPropertyChanged));
-
- /// <summary>
- /// 行番号の色を表す
- /// </summary>
- public Windows.UI.Color LineNumber
- {
- get { return (Windows.UI.Color)GetValue(LineNumberProperty); }
- set { SetValue(LineNumberProperty, value); }
- }
-
- /// <summary>
- /// Using a DependencyProperty as the backing store for LineNumber. This enables animation, styling, binding, etc...
- /// </summary>
- public static readonly DependencyProperty LineNumberProperty =
- DependencyProperty.Register("LineNumber", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.DimGray,OnPropertyChanged));
-
- /// <summary>
- /// 余白を表す
- /// </summary>
- public new Thickness Padding
- {
- get { return (Thickness)GetValue(PaddingProperty); }
- set { SetValue(PaddingProperty, value); }
- }
-
- /// <summary>
- /// Paddingの依存プロパティを表す
- /// </summary>
- public new static readonly DependencyProperty PaddingProperty =
- DependencyProperty.Register("Padding", typeof(Thickness), typeof(FooTextBox), new PropertyMetadata(new Thickness(),OnPropertyChanged));
-
- /// <summary>
- /// 挿入モードなら真を返し、そうでないなら、偽を返す。これは依存プロパティです
- /// </summary>
- public bool InsertMode
- {
- get { return (bool)GetValue(InsertModeProperty); }
- set { SetValue(InsertModeProperty, value); }
- }
-
- /// <summary>
- /// InsertModeの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty InsertModeProperty =
- DependencyProperty.Register("InsertMode",
- typeof(bool),
- typeof(FooTextBox),
- new PropertyMetadata(true, OnPropertyChanged));
-
- /// <summary>
- /// タブの文字数を表す。これは依存プロパティです
- /// </summary>
- public int TabChars
- {
- get { return (int)GetValue(TabCharsProperty); }
- set { SetValue(TabCharsProperty, value); }
- }
-
- /// <summary>
- /// TabCharsの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty TabCharsProperty =
- DependencyProperty.Register("TabChars",
- typeof(int),
- typeof(FooTextBox),
- new PropertyMetadata(4, OnPropertyChanged));
-
- /// <summary>
- /// 矩形選択モードなら真を返し、そうでないなら偽を返す。これは依存プロパティです
- /// </summary>
- public bool RectSelectMode
- {
- get { return (bool)GetValue(RectSelectModeProperty); }
- set { SetValue(RectSelectModeProperty, value); }
- }
-
- /// <summary>
- /// RectSelectModeの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty RectSelectModeProperty =
- DependencyProperty.Register("RectSelectMode", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// 折り返しの方法を指定する
- /// </summary>
- /// <remarks>
- /// 変更した場合、レイアウトの再構築を行う必要があります
- /// </remarks>
- public LineBreakMethod LineBreakMethod
- {
- get { return (LineBreakMethod)GetValue(LineBreakProperty); }
- set { SetValue(LineBreakProperty, value); }
- }
-
- /// <summary>
- /// LineBreakMethodの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty LineBreakProperty =
- DependencyProperty.Register("LineBreakMethod", typeof(LineBreakMethod), typeof(FooTextBox), new PropertyMetadata(LineBreakMethod.None, OnPropertyChanged));
-
-
- /// <summary>
- /// 折り返しの幅を指定する。LineBreakMethod.CharUnit以外の時は無視されます
- /// </summary>
- /// <remarks>
- /// 変更した場合、レイアウトの再構築を行う必要があります
- /// </remarks>
- public int LineBreakCharCount
- {
- get { return (int)GetValue(LineBreakCharCountProperty); }
- set { SetValue(LineBreakCharCountProperty, value); }
- }
-
- /// <summary>
- /// LineBreakCharCountの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty LineBreakCharCountProperty =
- DependencyProperty.Register("LineBreakCharCount", typeof(int), typeof(FooTextBox), new PropertyMetadata(80, OnPropertyChanged));
-
- /// <summary>
- /// キャレットを描くなら真。そうでないなら偽を返す。これは依存プロパティです
- /// </summary>
- public bool DrawCaret
- {
- get { return (bool)GetValue(DrawCaretProperty); }
- set { SetValue(DrawCaretProperty, value); }
- }
-
- /// <summary>
- /// DrawCaretの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty DrawCaretProperty =
- DependencyProperty.Register("DrawCaret", typeof(bool), typeof(FooTextBox), new PropertyMetadata(true, OnPropertyChanged));
-
-
- /// <summary>
- /// キャレットラインを描くなら真。そうでないなら偽を返す。これは依存プロパティです
- /// </summary>
- public bool DrawCaretLine
- {
- get { return (bool)GetValue(DrawCaretLineProperty); }
- set { SetValue(DrawCaretLineProperty, value); }
- }
-
- /// <summary>
- /// DrawCaretLineの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty DrawCaretLineProperty =
- DependencyProperty.Register("DrawCaretLine", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// 行番号を描くなら真。そうでなければ偽。これは依存プロパティです
- /// </summary>
- public bool DrawLineNumber
- {
- get { return (bool)GetValue(DrawLineNumberProperty); }
- set { SetValue(DrawLineNumberProperty, value); }
- }
-
- /// <summary>
- /// ルーラーを描くなら真。そうでなければ偽。これは依存プロパティです
- /// </summary>
- public bool DrawRuler
- {
- get { return (bool)GetValue(DrawRulerProperty); }
- set { SetValue(DrawRulerProperty, value); }
- }
-
- /// <summary>
- /// DrawRulerの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty DrawRulerProperty =
- DependencyProperty.Register("DrawRuler", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
-
- /// <summary>
- /// DrawLineNumberの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty DrawLineNumberProperty =
- DependencyProperty.Register("DrawLineNumber", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// URLに下線を引くなら真。そうでないなら偽を表す。これは依存プロパティです
- /// </summary>
- public bool MarkURL
- {
- get { return (bool)GetValue(MarkURLProperty); }
- set { SetValue(MarkURLProperty, value); }
- }
-
- /// <summary>
- /// MarkURLの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty MarkURLProperty =
- DependencyProperty.Register("MarkURL", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// 全角スペースを表示するなら真。そうでないなら偽
- /// </summary>
- public bool ShowFullSpace
- {
- get { return (bool)GetValue(ShowFullSpaceProperty); }
- set { SetValue(ShowFullSpaceProperty, value); }
- }
-
- /// <summary>
- /// ShowFullSpaceの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty ShowFullSpaceProperty =
- DependencyProperty.Register("ShowFullSpace", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// 半角スペースを表示するなら真。そうでないなら偽
- /// </summary>
- public bool ShowHalfSpace
- {
- get { return (bool)GetValue(ShowHalfSpaceProperty); }
- set { SetValue(ShowHalfSpaceProperty, value); }
- }
-
- /// <summary>
- /// ShowHalfSpaceの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty ShowHalfSpaceProperty =
- DependencyProperty.Register("ShowHalfSpace", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// タブを表示するなら真。そうでないなら偽
- /// </summary>
- public bool ShowTab
- {
- get { return (bool)GetValue(ShowTabProperty); }
- set { SetValue(ShowTabProperty, value); }
- }
-
- /// <summary>
- /// ShowTabの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty ShowTabProperty =
- DependencyProperty.Register("ShowTab", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false, OnPropertyChanged));
-
- /// <summary>
- /// 改行マークを表示するなら真。そうでないなら偽
- /// </summary>
- public bool ShowLineBreak
- {
- get { return (bool)GetValue(ShowLineBreakProperty); }
- set { SetValue(ShowLineBreakProperty, value); }
- }
-
- /// <summary>
- /// ShowLineBreakの依存プロパティを表す
- /// </summary>
- public static readonly DependencyProperty ShowLineBreakProperty =
- DependencyProperty.Register("ShowLineBreak", typeof(bool), typeof(FooTextBox), new PropertyMetadata(false,OnPropertyChanged));
-
-
- #endregion
-
- }
- /// <summary>
- /// コンテキストメニューのイベントデーターを表す
- /// </summary>
- public class FooContextMenuEventArgs
- {
- /// <summary>
- /// 処理済みなら真。そうでないなら偽
- /// </summary>
- public bool Handled = false;
- /// <summary>
- /// コンテキストメニューを表示すべき座標を表す
- /// </summary>
- public Windows.Foundation.Point Postion;
- /// <summary>
- /// コンストラクター
- /// </summary>
- /// <param name="pos"></param>
- public FooContextMenuEventArgs(Windows.Foundation.Point pos)
- {
- this.Postion = pos;
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Security;
-using System.Runtime.InteropServices;
-
-namespace FooEditEngine
-{
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("1b8efec4-3019-4c27-964e-367202156906")]
- [SecurityCritical]
- interface IPrintDocumentPackageTarget
- {
- void GetPackageTargetTypes([Out] out UInt32 targetCount, [Out] out Guid targetTypes);
- void GetPackageTarget([In]ref Guid guidTargetType,[In]ref Guid riid,[Out] out IntPtr ppvTarget);
- void Cancel();
-
- };
-
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("0b31cc62-d7ec-4747-9d6e-f2537d870f2b")]
- [SecurityCritical]
- interface IPrintPreviewPageCollection
- {
- void Paginate(
- [In] UInt32 currentJobPage,
- [In, MarshalAs(UnmanagedType.Interface)] object printTaskOptions);
- void MakePage(
- [In] UInt32 desiredJobPage,
- [In] float width,
- [In]float height);
-
- };
-
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("a96bb1db-172e-4667-82b5-ad97a252318f")]
- [SecurityCritical]
- interface IPrintDocumentPageSource
- {
- void GetPreviewPageCollection([In, MarshalAs(UnmanagedType.Interface)]IPrintDocumentPackageTarget docPackageTarget, [Out, MarshalAs(UnmanagedType.Interface)] out IPrintPreviewPageCollection docPageCollection);
- void MakeDocument([In, MarshalAs(UnmanagedType.Interface)] object printTaskOptions, [In, MarshalAs(UnmanagedType.Interface)]IPrintDocumentPackageTarget docPackageTarget);
- }
-
- enum PageCountType
- {
- FinalPageCount = 0,
- IntermediatePageCount = 1
- };
-
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("1a6dd0ad-1e2a-4e99-a5ba-91f17818290e")] //IID_PREVIEWPACKAGETARGET_DXGIと同じ
- [SecurityCritical]
- interface IPrintPreviewDxgiPackageTarget
- {
- void SetJobPageCount(
- [In] PageCountType countType,
- UInt32 count);
-
- void DrawPage(
- [In]UInt32 jobPageNumber,
- [In] IntPtr dxgiSurface,
- float dpiX,
- float dpiY);
-
- void InvalidatePreview();
-
- };
-
- static class PreviewPackageIds
- {
- public static string IID_PREVIEWPACKAGETARGET_DXGI = "1a6dd0ad-1e2a-4e99-a5ba-91f17818290e";
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Collections.Generic;
-using Windows.Graphics.Display;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Media.Imaging;
-using SharpDX;
-using SharpDX.WIC;
-using DXGI = SharpDX.DXGI;
-using D2D = SharpDX.Direct2D1;
-using D3D = SharpDX.Direct3D;
-using D3D11 = SharpDX.Direct3D11;
-using FooEditEngine.Metro;
-using DotNetTextStore;
-using DotNetTextStore.UnmanagedAPI.TSF;
-using DotNetTextStore.UnmanagedAPI.WinDef;
-
-namespace FooEditEngine
-{
- sealed class D2DPrintPreviewRender : D2DRenderBase, ITextRender, IPrintableTextRender
- {
- DXGI.Surface Surface;
- D3D11.Texture2D Texture;
- D2D.Device D2DDevice;
- D2D.DeviceContext D2DContext;
- D2D.Bitmap1 Bitmap;
- Size Size;
- float dpi;
-
- public D2DPrintPreviewRender(string fontName, double fontSize, Size size,float dpi)
- : base()
- {
- this.Size = size;
- this.dpi = dpi;
-
- base.ConstructDeviceResource(size.Width, size.Height);
- base.InitTextFormat(fontName, (float)fontSize);
- }
-
- public override void GetDpi(out float dpix, out float dpiy)
- {
- dpix = this.dpi;
- dpiy = this.dpi;
- }
-
- public void DrawContent(PrintableView view, IPrintPreviewDxgiPackageTarget target, uint page)
- {
- base.BegineDraw();
- view.Draw(view.PageBound);
- base.EndDraw();
- target.DrawPage(page, this.Surface.NativePointer, this.dpi, this.dpi);
- }
-
- public void Resize(float width,float height)
- {
- this.ReConstructDeviceResource(width, height);
- }
-
- public void SetScale(float scale)
- {
- this.D2DContext.Transform = Matrix3x2.Scaling(1/scale);
- }
-
- protected override D2D.RenderTarget ConstructRender(D2D.Factory1 factory, D2D.RenderTargetProperties prop, double width, double height)
- {
- D3D11.Texture2DDescription desc = new D3D11.Texture2DDescription();
- desc.Width = (int)(width * this.dpi / 96);
- desc.Height = (int)(height * this.dpi / 96);
- desc.Format = DXGI.Format.B8G8R8A8_UNorm;
- desc.BindFlags = D3D11.BindFlags.RenderTarget | D3D11.BindFlags.ShaderResource;
- desc.ArraySize = 1;
- desc.MipLevels = 1;
- desc.Usage = D3D11.ResourceUsage.Default;
- desc.CpuAccessFlags = 0;
- desc.SampleDescription = new DXGI.SampleDescription(1, 0);
- this.Texture = new D3D11.Texture2D(base.D3DDevice, desc);
-
- this.Surface = this.Texture.QueryInterface<DXGI.Surface>();
-
- this.D2DDevice = new D2D.Device(factory, this.DXGIDevice);
-
- this.D2DContext = new D2D.DeviceContext(this.D2DDevice, D2D.DeviceContextOptions.None);
-
- this.D2DContext.DotsPerInch = new Size2F(this.dpi, this.dpi);
-
- D2D.BitmapProperties1 bmpProp = new D2D.BitmapProperties1();
- bmpProp.BitmapOptions = D2D.BitmapOptions.Target | D2D.BitmapOptions.CannotDraw;
- bmpProp.PixelFormat = new D2D.PixelFormat(DXGI.Format.B8G8R8A8_UNorm, D2D.AlphaMode.Premultiplied);
-
- this.Bitmap = new D2D.Bitmap1(this.D2DContext, this.Surface, bmpProp);
-
- this.D2DContext.Target = this.Bitmap;
-
- return this.D2DContext;
- }
-
- protected override void ConstrctedResource()
- {
- }
-
- protected override void DestructRender()
- {
- if (this.Texture != null)
- this.Texture.Dispose();
- if (this.Surface != null)
- this.Surface.Dispose();
- if (this.Bitmap != null)
- this.Bitmap.Dispose();
- if (this.D2DDevice != null)
- this.D2DDevice.Dispose();
- if (this.D2DContext != null)
- this.D2DContext.Dispose();
- }
-
- protected override void ReCreateTarget()
- {
- }
-
- public float HeaderHeight
- {
- get { return (float)this.emSize.Height; }
- }
-
- public float FooterHeight
- {
- get { return (float)this.emSize.Height; }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Collections.Generic;
-using Windows.Graphics.Display;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Media.Imaging;
-using SharpDX;
-using SharpDX.WIC;
-using DXGI = SharpDX.DXGI;
-using D2D = SharpDX.Direct2D1;
-using D3D = SharpDX.Direct3D;
-using D3D11 = SharpDX.Direct3D11;
-using FooEditEngine.Metro;
-using DotNetTextStore;
-using DotNetTextStore.UnmanagedAPI.TSF;
-using DotNetTextStore.UnmanagedAPI.WinDef;
-
-namespace FooEditEngine
-{
- sealed class D2DPrintRender : D2DRenderBase, ITextRender, IPrintableTextRender
- {
- D2D.Device D2DDevice;
- D2D.DeviceContext D2DContext;
- D2D.PrintControl Control;
- D2D.CommandList CommandList;
- Size2F Size;
- ImagingFactory WICFactory = new ImagingFactory();
- int dpi;
-
- public D2DPrintRender(string fontName,double fontSize, Size size, uint dpi, IPrintDocumentPackageTarget docPackageTarget)
- : base()
- {
- base.ConstructDeviceResource(size.Width, size.Height);
- base.InitTextFormat(fontName, (float)fontSize);
-
- this.CreateSurface(size,dpi,docPackageTarget);
- }
-
- public override void GetDpi(out float dpix, out float dpiy)
- {
- dpix = this.dpi;
- dpiy = this.dpi;
- }
-
- public void DrawContent(PrintableView view)
- {
- this.CommandList = new D2D.CommandList(this.D2DContext);
- this.D2DContext.Target = this.CommandList;
- base.BegineDraw();
- view.Draw(view.PageBound);
- base.EndDraw();
- this.CommandList.Close();
- this.Control.AddPage(this.CommandList, this.Size);
- this.CommandList.Dispose();
- }
-
- void CreateSurface(Size size, uint dpi, IPrintDocumentPackageTarget docPackageTarget)
- {
- D2D.PrintControlProperties printControlProperties = new D2D.PrintControlProperties();
- printControlProperties.RasterDPI = dpi;
- printControlProperties.ColorSpace = D2D.ColorSpace.SRgb;
- printControlProperties.FontSubset = D2D.PrintFontSubsetMode.Default;
-
- this.Control = new D2D.PrintControl(this.D2DDevice, this.WICFactory, new ComObject(docPackageTarget), printControlProperties);
-
- this.Size = new Size2F((float)size.Width, (float)size.Height);
-
- this.dpi = (int)dpi;
- }
-
- protected override D2D.RenderTarget ConstructRender(D2D.Factory1 factory, D2D.RenderTargetProperties prop, double width, double height)
- {
- this.D2DDevice = new D2D.Device(factory,this.DXGIDevice);
- this.D2DContext = new D2D.DeviceContext(this.D2DDevice, D2D.DeviceContextOptions.None);
- return this.D2DContext;
- }
-
- protected override void ConstrctedResource()
- {
- }
-
- protected override void DestructRender()
- {
- if (this.Control != null)
- {
- this.Control.Close();
- this.Control.Dispose();
- }
- if (this.WICFactory != null)
- this.WICFactory.Dispose();
- if (this.D2DDevice != null)
- this.D2DDevice.Dispose();
- if (this.D2DContext != null)
- this.D2DContext.Dispose();
- }
-
- protected override void ReCreateTarget()
- {
- }
-
- public float HeaderHeight
- {
- get { return (float)this.emSize.Height; }
- }
-
- public float FooterHeight
- {
- get { return (float)this.emSize.Height; }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using Windows.Graphics.Display;
-using Windows.Graphics.Printing;
-using System.Runtime.InteropServices;
-using Windows.UI;
-using FooEditEngine.Metro;
-
-namespace FooEditEngine
-{
- /// <summary>
- /// イベントデータ
- /// </summary>
- public sealed class ParseCommandEventArgs
- {
- /// <summary>
- /// 印刷中のページ番号
- /// </summary>
- public int PageNumber;
- /// <summary>
- /// ページ範囲内で許容されている最大の番号
- /// </summary>
- public int MaxPageNumber;
- /// <summary>
- /// 処理前の文字列
- /// </summary>
- public string Original;
- /// <summary>
- /// コンストラクター
- /// </summary>
- /// <param name="nowPage">印刷中のページ番号</param>
- /// <param name="maxPage">印刷すべき最大のページ番号</param>
- /// <param name="org">処理前の文字列</param>
- public ParseCommandEventArgs(int nowPage, int maxPage, string org)
- {
- this.PageNumber = nowPage;
- this.MaxPageNumber = maxPage;
- this.Original = org;
- }
- }
-
- /// <summary>
- /// コマンド処理用デリゲート
- /// </summary>
- /// <param name="sender">送信元のクラス</param>
- /// <param name="e">イベントデータ</param>
- /// <returns>処理後の文字列</returns>
- public delegate string ParseCommandHandler(object sender, ParseCommandEventArgs e);
-
-
- sealed class PrintableViewFactory
- {
- Windows.UI.Color foreground, comment, keyword1, keyword2, literal, url;
- string fontName;
- double fontSize;
- LineBreakMethod lineBreakMethod;
- int lineBreakCharCount, tabCount;
- Document document;
- bool urlMark;
- IHilighter hilighter;
- float displayDpi;
- Padding padding;
- public PrintableViewFactory(FooTextBox textbox,Padding padding)
- {
- this.foreground = textbox.Foreground;
- this.comment = textbox.Comment;
- this.keyword1 = textbox.Keyword1;
- this.keyword2 = textbox.Keyword2;
- this.literal = textbox.Literal;
- this.url = textbox.URL;
- this.fontName = textbox.FontFamily.Source;
- this.fontSize = textbox.FontSize;
- this.tabCount = textbox.TabChars;
- this.document = textbox.Document;
- this.lineBreakMethod = textbox.LineBreakMethod;
- this.lineBreakCharCount = textbox.LineBreakCharCount;
- this.drawLineNumber = textbox.DrawLineNumber;
- this.urlMark = textbox.MarkURL;
- this.hilighter = textbox.Hilighter;
- this.displayDpi = DisplayInformation.GetForCurrentView().LogicalDpi;
- this.padding = padding;
- this.EnableHilight = true;
- }
- public D2DPrintRender CreateRender(PrintPageDescription pagedesc, IPrintDocumentPackageTarget docPackageTarget)
- {
- D2DPrintRender render;
- Size size = new Size(pagedesc.ImageableRect.Width, pagedesc.ImageableRect.Height);
- render = new D2DPrintRender(this.fontName, this.fontSize, size, Math.Min(pagedesc.DpiX, pagedesc.DpiY), docPackageTarget);
- render.Foreground = D2DRenderBase.ToColor4(this.foreground);
- render.Comment = D2DRenderBase.ToColor4(this.comment);
- render.Keyword1 = D2DRenderBase.ToColor4(this.keyword1);
- render.Keyword2 = D2DRenderBase.ToColor4(this.keyword2);
- render.Literal = D2DRenderBase.ToColor4(this.literal);
- render.Url = D2DRenderBase.ToColor4(this.url);
- return render;
- }
- public D2DPrintPreviewRender CreateRender(PrintPageDescription pagedesc)
- {
- D2DPrintPreviewRender render;
- Size size = new Size(pagedesc.ImageableRect.Width, pagedesc.ImageableRect.Height);
- render = new D2DPrintPreviewRender(this.fontName, this.fontSize, size, this.displayDpi);
- render.Foreground = D2DRenderBase.ToColor4(this.foreground);
- render.Comment = D2DRenderBase.ToColor4(this.comment);
- render.Keyword1 = D2DRenderBase.ToColor4(this.keyword1);
- render.Keyword2 = D2DRenderBase.ToColor4(this.keyword2);
- render.Literal = D2DRenderBase.ToColor4(this.literal);
- render.Url = D2DRenderBase.ToColor4(this.url);
- return render;
- }
- public PrintableView CreateView(PrintPageDescription pagedesc, IPrintableTextRender render, string header, string footer)
- {
- Document documentSnap = new Document(this.document);
- documentSnap.LayoutLines.Render = render;
- PrintableView view = new PrintableView(documentSnap, render,padding);
- view.Header = header;
- view.Footer = footer;
- view.PageBound = new Rectangle(pagedesc.ImageableRect.X, pagedesc.ImageableRect.Y, pagedesc.ImageableRect.Width, pagedesc.ImageableRect.Height);
- view.Hilighter = this.EnableHilight ? this.hilighter : null;
- documentSnap.DrawLineNumber = this.drawLineNumber;
- view.PerfomLayouts();
-
- return view;
- }
-
- public bool drawLineNumber
- {
- get;
- set;
- }
-
- public bool EnableHilight
- {
- get;
- set;
- }
- }
-
- sealed class DocumentSource : IPrintDocumentPageSource, IPrintPreviewPageCollection, IPrintDocumentSource,IPrintPreviewSource
- {
- IPrintPreviewDxgiPackageTarget dxgiPreviewTarget;
- bool paginateCalled = false;
- Size imageRect;
- PrintableViewFactory factory;
- D2DPrintPreviewRender previewRender;
- PrintableView previewView;
- int maxPreviePageCount;
-
- public ParseCommandHandler ParseHF;
- public string Header = string.Empty;
- public string Fotter = string.Empty;
-
- public DocumentSource(FooTextBox textbox,Padding padding)
- {
- this.factory = new PrintableViewFactory(textbox, padding);
- }
-
- internal enum SyntaxHilightApplibility
- {
- Apply,
- NoApply,
- }
-
- [DisplayPrintOptionResourceID("SyntaxHilight")]
- internal SyntaxHilightApplibility EnableHilight
- {
- get
- {
- return this.factory.EnableHilight ? SyntaxHilightApplibility.Apply : SyntaxHilightApplibility.NoApply;
- }
- set
- {
- this.factory.EnableHilight = value == SyntaxHilightApplibility.Apply;
- }
- }
-
- internal enum LineNumberVisiblity
- {
- Visible,
- Hidden
- }
-
- [DisplayPrintOptionResourceID("ShowLineNumber")]
- internal LineNumberVisiblity ShowLineNumber
- {
- get
- {
- return this.factory.drawLineNumber ? LineNumberVisiblity.Visible : LineNumberVisiblity.Hidden;
- }
- set
- {
- this.factory.drawLineNumber = value == LineNumberVisiblity.Visible;
- }
- }
-
- public void GetPreviewPageCollection(IPrintDocumentPackageTarget docPackageTarget, out IPrintPreviewPageCollection docPageCollection)
- {
- Guid guid = new Guid(PreviewPackageIds.IID_PREVIEWPACKAGETARGET_DXGI);
- IntPtr target;
- docPackageTarget.GetPackageTarget(guid, guid, out target);
- this.dxgiPreviewTarget = (IPrintPreviewDxgiPackageTarget)Marshal.GetObjectForIUnknown(target);
- docPageCollection = (IPrintPreviewPageCollection)this;
- }
-
- public void MakeDocument(object printTaskOptions, IPrintDocumentPackageTarget docPackageTarget)
- {
- PrintTaskOptions options = (PrintTaskOptions)printTaskOptions;
- PrintPageDescription pagedesc = options.GetPageDescription(1);
-
- D2DPrintRender render = this.factory.CreateRender(pagedesc, docPackageTarget);
- PrintableView view = this.factory.CreateView(pagedesc, render, this.Header, this.Fotter);
-
- bool result = false;
- int currentPage = 0;
-
- while (!result)
- {
- if(!string.IsNullOrEmpty(this.Header))
- view.Header = this.ParseHF(this, new ParseCommandEventArgs(currentPage, this.maxPreviePageCount, this.Header));
- if (!string.IsNullOrEmpty(this.Fotter))
- view.Footer = this.ParseHF(this, new ParseCommandEventArgs(currentPage, this.maxPreviePageCount, this.Fotter));
-
- render.DrawContent(view);
-
- result = view.TryPageDown();
- currentPage++;
- }
-
- render.Dispose();
- view.Dispose();
- }
-
- public void Paginate(uint currentJobPage, object printTaskOptions)
- {
- PrintTaskOptions options = (PrintTaskOptions)printTaskOptions;
- PrintPageDescription pagedesc = options.GetPageDescription(currentJobPage);
-
- this.imageRect = new Size(pagedesc.ImageableRect.Width, pagedesc.ImageableRect.Height);
-
- this.previewRender = this.factory.CreateRender(pagedesc);
- this.previewView = this.factory.CreateView(pagedesc, this.previewRender, this.Header, this.Fotter);
-
- int maxPage = 1;
- while (!this.previewView.TryPageDown())
- maxPage++;
-
- this.dxgiPreviewTarget.SetJobPageCount(PageCountType.FinalPageCount, (uint)maxPage);
-
- this.dxgiPreviewTarget.InvalidatePreview();
-
- this.maxPreviePageCount = maxPage;
-
- this.paginateCalled = true;
- }
-
- public void InvalidatePreview()
- {
- this.dxgiPreviewTarget.InvalidatePreview();
- }
-
- public void MakePage(uint desiredJobPage, float width, float height)
- {
- if (width <= 0 || height <= 0)
- throw new COMException("", 0x70057/*E_INVALIDARG*/);
- if (!this.paginateCalled)
- return;
- if (desiredJobPage == 0xFFFFFFFF)
- desiredJobPage = 1;
-
- this.previewView.TryScroll(0, 0); //元に戻さないとページ番号が変わった時に正しく動作しない
-
- for (int i = 1; i < desiredJobPage; i++)
- this.previewView.TryPageDown();
-
- if (!string.IsNullOrEmpty(this.Header))
- this.previewView.Header = this.ParseHF(this, new ParseCommandEventArgs((int)desiredJobPage, this.maxPreviePageCount, this.Header));
- if (!string.IsNullOrEmpty(this.Fotter))
- this.previewView.Footer = this.ParseHF(this, new ParseCommandEventArgs((int)desiredJobPage, this.maxPreviePageCount, this.Fotter));
-
- this.previewRender.Resize(width, height);
- this.previewRender.SetScale((float)(this.previewView.PageBound.Width / width)); //BeginDraw()で倍率が1に戻る
-
- this.previewRender.DrawContent(this.previewView, this.dxgiPreviewTarget, desiredJobPage);
- }
-
- public void Dispose()
- {
- if (this.previewView != null)
- this.previewView.Dispose();
- if (this.previewRender != null)
- this.previewRender.Dispose();
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using Windows.Graphics.Printing.OptionDetails;
-using System.Reflection;
-using Windows.ApplicationModel.Resources.Core;
-
-namespace FooEditEngine
-{
- /// <summary>
- /// 表示に使用するリソースID
- /// </summary>
- sealed class DisplayPrintOptionResourceIDAttribute : Attribute
- {
- public string ResourceID
- {
- get;
- private set;
- }
- /// <summary>
- /// コンストラクター
- /// </summary>
- /// <param name="resourceID">リソースID</param>
- public DisplayPrintOptionResourceIDAttribute(string resourceID)
- {
- this.ResourceID = resourceID;
- }
- }
- /// <summary>
- /// IPrintPreviewSourceインターフェイス
- /// </summary>
- interface IPrintPreviewSource
- {
- /// <summary>
- /// 再描写する
- /// </summary>
- void InvalidatePreview();
- }
- /// <summary>
- /// 印刷プレビューのカスタムオプションリストビルダー
- /// <para>
- /// 印刷プレビューに表示させたいプロパティには「DisplayPrintOptionResourceID」属性を付ける必要があります。
- /// また、このプロパティはenumを継承した型でなければならず、リソースに「型名.値」という形で印刷プレビューに表示される名前を定義する必要があります。
- /// 定義しない場合、値がそのまま表示されます
- /// </para>
- /// </summary>
- /// <typeparam name="T">IPrintPreviewSourceを継承したクラス</typeparam>
- sealed class PrintOptionBuilder<T> where T : IPrintPreviewSource
- {
- T PrintDocument;
- /// <summary>
- /// コンストラクター
- /// </summary>
- /// <param name="source">対象となるオブジェクト</param>
- public PrintOptionBuilder(T source)
- {
- this.PrintDocument = source;
- }
-
- /// <summary>
- /// 印刷プレビューのオプションを作成する
- /// </summary>
- /// <param name="details">PrintTaskOptionDetailsオブジェクト</param>
- public void BuildPrintOption(PrintTaskOptionDetails details)
- {
- ResourceMap map = ResourceManager.Current.MainResourceMap.GetSubtree("FooEditEngine.Metro/Resources");
- ResourceContext context = ResourceContext.GetForCurrentView();
-
- var properties = this.PrintDocument.GetType().GetRuntimeProperties();
- foreach(PropertyInfo property in properties)
- {
- DisplayPrintOptionResourceIDAttribute attr = property.GetCustomAttribute<DisplayPrintOptionResourceIDAttribute>();
- if (attr == null)
- continue;
- string resourceName;
- if(property.PropertyType.GetTypeInfo().IsEnum)
- {
- PrintCustomItemListOptionDetails iteminfo = details.CreateItemListOption(property.Name, map.GetValue(attr.ResourceID, context).ValueAsString);
- foreach (var enumvalue in Enum.GetValues(property.PropertyType))
- {
- string enumvalueStr = enumvalue.ToString();
- //リソース内部の"."は"/"に変換される
- resourceName = property.PropertyType.Name + "/" + enumvalueStr;
- ResourceCandidate resValue = map.GetValue(resourceName, context);
-#if DEBUG
- if(resValue == null)
- System.Diagnostics.Debug.WriteLine("{0} is not defined by resource",resourceName.Replace('/','.'));
-#endif
- iteminfo.AddItem(enumvalueStr, resValue != null ? resValue.ValueAsString : enumvalueStr);
- }
- iteminfo.TrySetValue(property.GetValue(this.PrintDocument).ToString());
- details.DisplayedOptions.Add(property.Name);
- }
- }
-
- details.OptionChanged += details_OptionChanged;
- }
-
- void details_OptionChanged(PrintTaskOptionDetails sender, PrintTaskOptionChangedEventArgs args)
- {
- string optionID = args.OptionId as string;
- if (optionID == null)
- return;
- string optionValue = sender.Options[optionID].Value as string;
- var property = this.GetRuntimeProperty(this.PrintDocument.GetType(),optionID);
- if (property == null)
- return;
- if (property.PropertyType.GetTypeInfo().IsEnum)
- {
- Enum output = (Enum)Enum.Parse(property.PropertyType, optionValue);
- property.SetMethod.Invoke(this.PrintDocument, new object[] { output });
- }
-
- this.PrintDocument.InvalidatePreview();
- }
-
- PropertyInfo GetRuntimeProperty(Type t,string name)
- {
- foreach(PropertyInfo property in t.GetRuntimeProperties())
- {
- if (property.Name == name)
- return property;
- }
- return null;
- }
- }
-}
+++ /dev/null
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// アセンブリに関する情報は、次の属性のセットを通して制御されます。
-// アセンブリに関連付けられている情報を変更するには、
-// これらの属性値を変更してください。
-[assembly: AssemblyTitle("FooEditEngnine")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("FooEditEngnine")]
-[assembly: AssemblyCopyright("Copyright © 2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
-//
-// メジャー バージョン
-// マイナー バージョン
-// ビルド番号
-// リビジョン
-//
-// すべての値を指定するか、以下のように '*' を使用してビルドおよびリビジョン番号を
-// 既定値にすることができます:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.20.0.0")]
-[assembly: AssemblyFileVersion("1.20.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
+++ /dev/null
-<ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:FooEditEngine.Metro">
-
- <ControlTemplate x:Key="FooTextBoxTemplate" TargetType="local:FooTextBox">
- <Border x:Name="BorderElement"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <Grid x:Name="PART_Grid">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <ScrollBar x:Name="PART_VerticalScrollBar"
- Orientation="Vertical"
- Grid.Row="0"
- Grid.Column="1"
- IndicatorMode="MouseIndicator"
- Visibility="Visible"/>
- <ScrollBar x:Name="PART_HorizontalScrollBar"
- Orientation="Horizontal"
- Grid.Row="1"
- Grid.Column="0"
- IndicatorMode="MouseIndicator"
- Visibility="Visible"/>
- </Grid>
- </Border>
- </ControlTemplate>
-
- <ResourceDictionary.ThemeDictionaries>
- <ResourceDictionary x:Key="Default">
- <Style TargetType="local:FooTextBox">
- <Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
- <Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
- <Setter Property="Foreground" Value="#FF000000"/>
- <Setter Property="InsertCaret" Value="#FF000000"/>
- <Setter Property="OverwriteCaret" Value="#FF000000"/>
- <Setter Property="Background" Value="#FFFFFFFF"/>
- <Setter Property="LineMarker" Value="LightGray"/>
- <Setter Property="Template" Value="{StaticResource FooTextBoxTemplate}"/>
- </Style>
- </ResourceDictionary>
- <ResourceDictionary x:Key="HighContrastBlack">
- <Style TargetType="local:FooTextBox">
- <Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
- <Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
- <Setter Property="Foreground" Value="#FFFFFFFF"/>
- <Setter Property="InsertCaret" Value="#FFFFFFFF"/>
- <Setter Property="OverwriteCaret" Value="#FFFFFFFF"/>
- <Setter Property="Background" Value="#FF000000"/>
- <Setter Property="LineMarker" Value="Gray"/>
- <Setter Property="Template" Value="{StaticResource FooTextBoxTemplate}"/>
- </Style>
- </ResourceDictionary>
- <ResourceDictionary x:Key="HighContrastWhite">
- <Style TargetType="local:FooTextBox">
- <Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
- <Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
- <Setter Property="Foreground" Value="#FF000000"/>
- <Setter Property="InsertCaret" Value="#FF000000"/>
- <Setter Property="OverwriteCaret" Value="#FF000000"/>
- <Setter Property="Background" Value="#FFFFFFFF"/>
- <Setter Property="LineMarker" Value="LightGray"/>
- <Setter Property="Template" Value="{StaticResource FooTextBoxTemplate}"/>
- </Style>
- </ResourceDictionary>
- <ResourceDictionary x:Key="HighContrastCustom">
- <Style TargetType="local:FooTextBox">
- <Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
- <Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
- <Setter Property="Foreground" Value="#FF000000"/>
- <Setter Property="InsertCaret" Value="#FF000000"/>
- <Setter Property="OverwriteCaret" Value="#FF000000"/>
- <Setter Property="Background" Value="#FFFFFFFF"/>
- <Setter Property="LineMarker" Value="DarkGray"/>
- <Setter Property="Template" Value="{StaticResource FooTextBoxTemplate}"/>
- </Style>
- </ResourceDictionary>
- </ResourceDictionary.ThemeDictionaries>
-
-</ResourceDictionary>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <data name="CopyMenuName" xml:space="preserve">
- <value>Copy</value>
- </data>
- <data name="CutMenuName" xml:space="preserve">
- <value>Cut</value>
- </data>
- <data name="LineNumberVisiblity.Hidden" xml:space="preserve">
- <value>Hidden</value>
- </data>
- <data name="LineNumberVisiblity.Visible" xml:space="preserve">
- <value>Visible</value>
- </data>
- <data name="LineSelectMenuName" xml:space="preserve">
- <value>LineSelect</value>
- </data>
- <data name="PasteMenuName" xml:space="preserve">
- <value>Paste</value>
- </data>
- <data name="RectSelectMenuName" xml:space="preserve">
- <value>RectangleSelect</value>
- </data>
- <data name="ShowLineNumber" xml:space="preserve">
- <value>LineNumber</value>
- </data>
- <data name="SyntaxHilight" xml:space="preserve">
- <value>SyntaxHilight</value>
- </data>
- <data name="SyntaxHilightApplibility.Apply" xml:space="preserve">
- <value>Apply</value>
- </data>
- <data name="SyntaxHilightApplibility.NoApply" xml:space="preserve">
- <value>Not Apply</value>
- </data>
-</root>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <data name="CopyMenuName" xml:space="preserve">
- <value>コピー</value>
- </data>
- <data name="CutMenuName" xml:space="preserve">
- <value>切り取り</value>
- </data>
- <data name="LineNumberVisiblity.Hidden" xml:space="preserve">
- <value>表示しない</value>
- </data>
- <data name="LineNumberVisiblity.Visible" xml:space="preserve">
- <value>表示する</value>
- </data>
- <data name="LineSelectMenuName" xml:space="preserve">
- <value>行選択</value>
- </data>
- <data name="PasteMenuName" xml:space="preserve">
- <value>貼り付け</value>
- </data>
- <data name="RectSelectMenuName" xml:space="preserve">
- <value>矩形選択</value>
- </data>
- <data name="ShowLineNumber" xml:space="preserve">
- <value>行番号</value>
- </data>
- <data name="SyntaxHilight" xml:space="preserve">
- <value>シンタックスハイライト</value>
- </data>
- <data name="SyntaxHilightApplibility.Apply" xml:space="preserve">
- <value>反映させる</value>
- </data>
- <data name="SyntaxHilightApplibility.NoApply" xml:space="preserve">
- <value>反映させない</value>
- </data>
-</root>
\ No newline at end of file
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{D5A54EBE-15AC-48E9-819B-99314266B683}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FooEditEngine", "FooEditEngine\FooEditEngine.csproj", "{AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetTextStore.Metro", "..\DotNetTextStore\DotNetTextStore.Metro.csproj", "{453C491E-EF3A-41AD-A725-8855C1CB2C84}"
-EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Core", "..\Core\Core.shproj", "{C244F4E5-45D2-4C1F-BD2A-A5CC90D9421B}"
-EndProject
-Global
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ..\Core\Core.projitems*{ac23ebf4-4cd0-43ea-9808-0e6dcd12e791}*SharedItemsImports = 4
- ..\Core\Core.projitems*{c244f4e5-45d2-4c1f-bd2a-a5cc90d9421b}*SharedItemsImports = 13
- EndGlobalSection
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|ARM.ActiveCfg = Debug|ARM
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|ARM.Build.0 = Debug|ARM
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|ARM.Deploy.0 = Debug|ARM
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|x64.ActiveCfg = Debug|x64
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|x64.Build.0 = Debug|x64
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|x64.Deploy.0 = Debug|x64
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|x86.ActiveCfg = Debug|x86
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|x86.Build.0 = Debug|x86
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Debug|x86.Deploy.0 = Debug|x86
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|ARM.ActiveCfg = Release|ARM
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|ARM.Build.0 = Release|ARM
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|ARM.Deploy.0 = Release|ARM
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|x64.ActiveCfg = Release|x64
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|x64.Build.0 = Release|x64
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|x64.Deploy.0 = Release|x64
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|x86.ActiveCfg = Release|x86
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|x86.Build.0 = Release|x86
- {D5A54EBE-15AC-48E9-819B-99314266B683}.Release|x86.Deploy.0 = Release|x86
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|ARM.ActiveCfg = Debug|ARM
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|ARM.Build.0 = Debug|ARM
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|x64.ActiveCfg = Debug|x64
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|x64.Build.0 = Debug|x64
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|x86.ActiveCfg = Debug|x86
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Debug|x86.Build.0 = Debug|x86
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|Any CPU.Build.0 = Release|Any CPU
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|ARM.ActiveCfg = Release|ARM
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|ARM.Build.0 = Release|ARM
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|x64.ActiveCfg = Release|x64
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|x64.Build.0 = Release|x64
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|x86.ActiveCfg = Release|x86
- {AC23EBF4-4CD0-43EA-9808-0E6DCD12E791}.Release|x86.Build.0 = Release|x86
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|ARM.Build.0 = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|x64.ActiveCfg = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|x64.Build.0 = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|x86.ActiveCfg = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Debug|x86.Build.0 = Debug|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|Any CPU.Build.0 = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|ARM.ActiveCfg = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|ARM.Build.0 = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|x64.ActiveCfg = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|x64.Build.0 = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|x86.ActiveCfg = Release|Any CPU
- {453C491E-EF3A-41AD-A725-8855C1CB2C84}.Release|x86.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<Application\r
- x:Class="Test.App"\r
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
- xmlns:local="using:Test">\r
-\r
- <Application.Resources>\r
- <ResourceDictionary>\r
- <ResourceDictionary.MergedDictionaries>\r
-\r
- <!-- \r
- プラットフォームの外観の共通の要素を定義するスタイル\r
- Visual Studio プロジェクトおよびアイテム テンプレートで必要です\r
- -->\r
- <ResourceDictionary Source="Common/StandardStyles.xaml"/>\r
- </ResourceDictionary.MergedDictionaries>\r
-\r
- </ResourceDictionary>\r
- </Application.Resources>\r
-</Application>\r
+++ /dev/null
-/*\r
- * Copyright (C) 2013 FooProject\r
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\r
-\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of \r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-using System;\r
-using System.Collections.Generic;\r
-using System.IO;\r
-using System.Linq;\r
-using Windows.ApplicationModel;\r
-using Windows.ApplicationModel.Activation;\r
-using Windows.Foundation;\r
-using Windows.Foundation.Collections;\r
-using Windows.UI.Xaml;\r
-using Windows.UI.Xaml.Controls;\r
-using Windows.UI.Xaml.Controls.Primitives;\r
-using Windows.UI.Xaml.Data;\r
-using Windows.UI.Xaml.Input;\r
-using Windows.UI.Xaml.Media;\r
-using Windows.UI.Xaml.Navigation;\r
-using Windows.UI.ApplicationSettings;\r
-using Windows.UI.Popups;\r
-\r
-// 空のアプリケーション テンプレートについては、http://go.microsoft.com/fwlink/?LinkId=234227 を参照してください\r
-\r
-namespace Test\r
-{\r
- /// <summary>\r
- /// 既定の Application クラスを補完するアプリケーション固有の動作を提供します。\r
- /// </summary>\r
- sealed partial class App : Application\r
- {\r
- bool SettingRegistored;\r
- Popup Popup;\r
-\r
- /// <summary>\r
- /// 単一アプリケーション オブジェクトを初期化します。これは、実行される作成したコードの\r
- /// 最初の行であり、main() または WinMain() と論理的に等価です。\r
- /// </summary>\r
- public App()\r
- {\r
- this.InitializeComponent();\r
- this.Suspending += OnSuspending;\r
- }\r
-\r
- /// <summary>\r
- /// アプリケーションがエンド ユーザーによって正常に起動されたときに呼び出されます。他のエントリ ポイントは、\r
- /// アプリケーションが特定のファイルを開くために呼び出されたときに\r
- /// 検索結果やその他の情報を表示するために使用されます。\r
- /// </summary>\r
- /// <param name="args">起動要求とプロセスの詳細を表示します。</param>\r
- protected override void OnLaunched(LaunchActivatedEventArgs args)\r
- {\r
- Frame rootFrame = Window.Current.Content as Frame;\r
-\r
- // ウィンドウに既にコンテンツが表示されている場合は、アプリケーションの初期化を繰り返さずに、\r
- // ウィンドウがアクティブであることだけを確認してください\r
- if (rootFrame == null)\r
- {\r
- // ナビゲーション コンテキストとして動作するフレームを作成し、最初のページに移動します\r
- rootFrame = new Frame();\r
-\r
- if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)\r
- {\r
- //TODO: 以前中断したアプリケーションから状態を読み込みます。\r
- }\r
-\r
- // フレームを現在のウィンドウに配置します\r
- Window.Current.Content = rootFrame;\r
- }\r
-\r
- if (rootFrame.Content == null)\r
- {\r
- // ナビゲーション スタックが復元されていない場合、最初のページに移動します。\r
- // このとき、必要な情報をナビゲーション パラメーターとして渡して、新しいページを\r
- // 構成します\r
- if (!rootFrame.Navigate(typeof(MainPage), args.Arguments))\r
- {\r
- throw new Exception("Failed to create initial page");\r
- }\r
- }\r
- if (!this.SettingRegistored)\r
- {\r
- SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;\r
- this.SettingRegistored = true;\r
- }\r
- // 現在のウィンドウがアクティブであることを確認します\r
- Window.Current.Activate();\r
- }\r
-\r
- void OnCommandsRequested(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs eventArgs)\r
- {\r
- var handler = new UICommandInvokedHandler(OnSettingsCommand);\r
-\r
- var policyCommand = new SettingsCommand("setting", "設定", handler);\r
- eventArgs.Request.ApplicationCommands.Add(policyCommand);\r
- }\r
-\r
- private void OnSettingsCommand(IUICommand command)\r
- {\r
- var settingsCommand = (SettingsCommand)command;\r
- switch (settingsCommand.Id.ToString())\r
- {\r
- case "setting":\r
- ShowSettingsFlyout();\r
- break;\r
- }\r
- }\r
-\r
- void ShowSettingsFlyout()\r
- {\r
- var flyout = new Test.SettingsFlyout1();\r
- flyout.Show();\r
- }\r
-\r
- /// <summary>\r
- /// アプリケーションの実行が中断されたときに呼び出されます。アプリケーションの状態は、\r
- /// アプリケーションが終了されるのか、メモリの内容がそのままで再開されるのか\r
- /// わからない状態で保存されます。\r
- /// </summary>\r
- /// <param name="sender">中断要求の送信元。</param>\r
- /// <param name="e">中断要求の詳細。</param>\r
- private void OnSuspending(object sender, SuspendingEventArgs e)\r
- {\r
- var deferral = e.SuspendingOperation.GetDeferral();\r
- //TODO: アプリケーションの状態を保存してバックグラウンドの動作があれば停止します\r
- deferral.Complete();\r
- }\r
- }\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (C) 2013 FooProject\r
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\r
-\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of \r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Collections.ObjectModel;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
-using FooEditEngine;\r
-\r
-namespace Test\r
-{\r
- public class AppSettings\r
- {\r
- public static AppSettings _thisInstance = new AppSettings();\r
- public static AppSettings Current\r
- {\r
- get\r
- {\r
- if (_thisInstance._LineBreakMethodList == null)\r
- {\r
- _thisInstance._LineBreakMethodList = new ObservableCollection<LineBreakMethodItem>();\r
- _thisInstance._LineBreakMethodList.Add(new LineBreakMethodItem("折りたたまない", LineBreakMethod.None));\r
- _thisInstance._LineBreakMethodList.Add(new LineBreakMethodItem("右端で折りたたむ", LineBreakMethod.PageBound));\r
- _thisInstance._LineBreakMethodList.Add(new LineBreakMethodItem("50字で折りたたむ", LineBreakMethod.CharUnit));\r
- _thisInstance._CurrentLineBreakMethod = _thisInstance._LineBreakMethodList[0];\r
- }\r
- return _thisInstance;\r
- }\r
- }\r
-\r
- bool _IsRTL, _ShowRuler, _ShowLineNumber, _ShowLineMarker, _HilightXML, _IsVisible = true;\r
- ObservableCollection<LineBreakMethodItem> _LineBreakMethodList;\r
- LineBreakMethodItem _CurrentLineBreakMethod;\r
-\r
- public ObservableCollection<LineBreakMethodItem> LineBreakMethodList\r
- {\r
- get\r
- {\r
- return _LineBreakMethodList;\r
- }\r
- }\r
-\r
- public LineBreakMethodItem CurrentLineBreakMethod\r
- {\r
- get\r
- {\r
- return _CurrentLineBreakMethod;\r
- }\r
- set\r
- {\r
- this._CurrentLineBreakMethod = value;\r
- if (ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public bool IsVisible\r
- {\r
- get\r
- {\r
- return this._IsVisible;\r
- }\r
- set\r
- {\r
- this._IsVisible = value;\r
- if (ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public bool IsRTL\r
- {\r
- get\r
- {\r
- return _IsRTL;\r
- }\r
- set\r
- {\r
- _IsRTL = value;\r
- if (ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public bool ShowRuler\r
- {\r
- get\r
- {\r
- return _ShowRuler;\r
- }\r
- set\r
- {\r
- _ShowRuler = value;\r
- if(ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public bool ShowLineNumber\r
- {\r
- get\r
- {\r
- return _ShowLineNumber;\r
- }\r
- set\r
- {\r
- _ShowLineNumber = value;\r
- if (ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public bool ShowLineMarker\r
- {\r
- get\r
- {\r
- return _ShowLineMarker;\r
- }\r
- set\r
- {\r
- _ShowLineMarker = value;\r
- if (ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public bool HilightXML\r
- {\r
- get\r
- {\r
- return _HilightXML;\r
- }\r
- set\r
- {\r
- _HilightXML = value;\r
- if (ChangedSetting != null)\r
- ChangedSetting(this, null);\r
- }\r
- }\r
-\r
- public event EventHandler ChangedSetting;\r
- }\r
- public struct LineBreakMethodItem\r
- {\r
- string _Title;\r
- LineBreakMethod _Method;\r
- public string Title\r
- {\r
- get\r
- {\r
- return this._Title;\r
- }\r
- }\r
- public LineBreakMethod Method\r
- {\r
- get\r
- {\r
- return this._Method;\r
- }\r
- }\r
- public LineBreakMethodItem(string title, LineBreakMethod method)\r
- {\r
- this._Title = title;\r
- this._Method = method;\r
- }\r
- }\r
-}\r
+++ /dev/null
-<!--\r
- このファイルには、アプリケーションの開発を単純化する XAML スタイルが含まれています。\r
-\r
- これらは便利なだけでなく、ほとんどの Visual Studio プロジェクトとアイテム テンプレートで\r
- 必要です。これらのファイルに対して、削除、名前変更、内容の変更などを行うと、プロジェクトが\r
- ビルドされなくなったり、ページが追加されたときにビルドされなくなったりすることがあります。\r
- これらのスタイルのバリエーションが必要な場合は、内容をコピーして新しい名前を指定し、その\r
- コピーを変更することをお勧めします。\r
--->\r
-\r
-<ResourceDictionary\r
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">\r
-\r
- <!-- テーマによって変化する非ブラシ値 -->\r
-\r
- <ResourceDictionary.ThemeDictionaries>\r
- <ResourceDictionary x:Key="Default">\r
- <x:String x:Key="BackButtonGlyph"></x:String>\r
- <x:String x:Key="BackButtonSnappedGlyph"></x:String>\r
- </ResourceDictionary>\r
-\r
- <ResourceDictionary x:Key="HighContrast">\r
- <x:String x:Key="BackButtonGlyph"></x:String>\r
- <x:String x:Key="BackButtonSnappedGlyph"></x:String>\r
- </ResourceDictionary>\r
- </ResourceDictionary.ThemeDictionaries>\r
-\r
- <x:String x:Key="ChevronGlyph"></x:String>\r
-\r
- <!-- RichTextBlock スタイル -->\r
-\r
- <Style x:Key="BasicRichTextStyle" TargetType="RichTextBlock">\r
- <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>\r
- <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>\r
- <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>\r
- <Setter Property="TextTrimming" Value="WordEllipsis"/>\r
- <Setter Property="TextWrapping" Value="Wrap"/>\r
- <Setter Property="Typography.StylisticSet20" Value="True"/>\r
- <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>\r
- <Setter Property="Typography.CaseSensitiveForms" Value="True"/>\r
- </Style>\r
-\r
- <Style x:Key="BaselineRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BasicRichTextStyle}">\r
- <Setter Property="LineHeight" Value="20"/>\r
- <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>\r
- <!-- ベースラインに沿ってテキストを整列 -->\r
- <Setter Property="RenderTransform">\r
- <Setter.Value>\r
- <TranslateTransform X="-1" Y="4"/>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <Style x:Key="ItemRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}"/>\r
-\r
- <Style x:Key="BodyRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}">\r
- <Setter Property="FontWeight" Value="SemiLight"/>\r
- </Style>\r
-\r
- <!-- TextBlock スタイル -->\r
-\r
- <Style x:Key="BasicTextStyle" TargetType="TextBlock">\r
- <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>\r
- <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>\r
- <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>\r
- <Setter Property="TextTrimming" Value="WordEllipsis"/>\r
- <Setter Property="TextWrapping" Value="Wrap"/>\r
- <Setter Property="Typography.StylisticSet20" Value="True"/>\r
- <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>\r
- <Setter Property="Typography.CaseSensitiveForms" Value="True"/>\r
- </Style>\r
-\r
- <Style x:Key="BaselineTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BasicTextStyle}">\r
- <Setter Property="LineHeight" Value="20"/>\r
- <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>\r
- <!-- ベースラインに沿ってテキストを整列 -->\r
- <Setter Property="RenderTransform">\r
- <Setter.Value>\r
- <TranslateTransform X="-1" Y="4"/>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <Style x:Key="HeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">\r
- <Setter Property="FontSize" Value="56"/>\r
- <Setter Property="FontWeight" Value="Light"/>\r
- <Setter Property="LineHeight" Value="40"/>\r
- <Setter Property="RenderTransform">\r
- <Setter.Value>\r
- <TranslateTransform X="-2" Y="8"/>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <Style x:Key="SubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">\r
- <Setter Property="FontSize" Value="26.667"/>\r
- <Setter Property="FontWeight" Value="Light"/>\r
- <Setter Property="LineHeight" Value="30"/>\r
- <Setter Property="RenderTransform">\r
- <Setter.Value>\r
- <TranslateTransform X="-1" Y="6"/>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <Style x:Key="TitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">\r
- <Setter Property="FontWeight" Value="SemiBold"/>\r
- </Style>\r
-\r
- <Style x:Key="SubtitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">\r
- <Setter Property="FontWeight" Value="Normal"/>\r
- </Style>\r
-\r
- <Style x:Key="ItemTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}"/>\r
-\r
- <Style x:Key="BodyTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">\r
- <Setter Property="FontWeight" Value="SemiLight"/>\r
- </Style>\r
-\r
- <Style x:Key="CaptionTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">\r
- <Setter Property="FontSize" Value="12"/>\r
- <Setter Property="Foreground" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>\r
- </Style>\r
-\r
- <Style x:Key="GroupHeaderTextStyle" TargetType="TextBlock">\r
- <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>\r
- <Setter Property="TextTrimming" Value="WordEllipsis"/>\r
- <Setter Property="TextWrapping" Value="NoWrap"/>\r
- <Setter Property="Typography.StylisticSet20" Value="True"/>\r
- <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>\r
- <Setter Property="Typography.CaseSensitiveForms" Value="True"/>\r
- <Setter Property="FontSize" Value="26.667"/>\r
- <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>\r
- <Setter Property="FontWeight" Value="Light"/>\r
- <Setter Property="LineHeight" Value="30"/>\r
- <Setter Property="RenderTransform">\r
- <Setter.Value>\r
- <TranslateTransform X="-1" Y="6"/>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <!-- Button スタイル -->\r
- \r
- <!--\r
- TextButtonStyle is used to style a Button using subheader-styled text with no other adornment. There\r
- are two styles that are based on TextButtonStyle (TextPrimaryButtonStyle and TextSecondaryButtonStyle)\r
- which are used in the GroupedItemsPage as a group header and in the FileOpenPickerPage for triggering\r
- commands.\r
- -->\r
- <Style x:Key="TextButtonStyle" TargetType="ButtonBase">\r
- <Setter Property="MinWidth" Value="0"/>\r
- <Setter Property="MinHeight" Value="0"/>\r
- <Setter Property="Template">\r
- <Setter.Value>\r
- <ControlTemplate TargetType="ButtonBase">\r
- <Grid Background="Transparent">\r
- <ContentPresenter x:Name="Text" Content="{TemplateBinding Content}" />\r
- <Rectangle\r
- x:Name="FocusVisualWhite"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="1.5"/>\r
- <Rectangle\r
- x:Name="FocusVisualBlack"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="0.5"/>\r
- <VisualStateManager.VisualStateGroups>\r
- <VisualStateGroup x:Name="CommonStates">\r
- <VisualState x:Name="Normal"/>\r
- <VisualState x:Name="PointerOver">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPointerOverForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Pressed">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Disabled">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="FocusStates">\r
- <VisualState x:Name="Focused">\r
- <Storyboard>\r
- <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>\r
- <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Unfocused"/>\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="CheckStates">\r
- <VisualState x:Name="Checked"/>\r
- <VisualState x:Name="Unchecked">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Indeterminate"/>\r
- </VisualStateGroup>\r
- </VisualStateManager.VisualStateGroups>\r
- </Grid>\r
- </ControlTemplate>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <Style x:Key="TextPrimaryButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource TextButtonStyle}">\r
- <Setter Property="Foreground" Value="{StaticResource ApplicationHeaderForegroundThemeBrush}"/>\r
- </Style>\r
-\r
- <Style x:Key="TextSecondaryButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource TextButtonStyle}">\r
- <Setter Property="Foreground" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>\r
- </Style>\r
-\r
- <!--\r
- TextRadioButtonStyle は、RadioButton をサブヘッダー スタイルのテキストだけを使用してスタイリング\r
- します。このスタイルは、SearchResultsPage でフィルターを選択できるようにするために使用されます。\r
- -->\r
- <Style x:Key="TextRadioButtonStyle" TargetType="RadioButton" BasedOn="{StaticResource TextButtonStyle}">\r
- <Setter Property="Margin" Value="0,0,30,0"/>\r
- </Style>\r
-\r
- <!--\r
- AppBarButtonStyle は、アプリ バーで使用される Button (または ToggleButton) をスタイリングするために\r
- 使用されます。内容は中央に配置され、用意された半径 40 ピクセルのグリフの中に収まる必要があります。 \r
- グリフの使用を単純化するため、内容のテキストでは 16 ポイントの Segoe UI Symbol が使用されます。\r
- グリフの下のテキストでは AutomationProperties.Name が使用されます。\r
- -->\r
- <Style x:Key="AppBarButtonStyle" TargetType="ButtonBase">\r
- <Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>\r
- <Setter Property="VerticalAlignment" Value="Stretch"/>\r
- <Setter Property="FontFamily" Value="Segoe UI Symbol"/>\r
- <Setter Property="FontWeight" Value="Normal"/>\r
- <Setter Property="FontSize" Value="20"/>\r
- <Setter Property="AutomationProperties.ItemType" Value="App Bar Button"/>\r
- <Setter Property="Template">\r
- <Setter.Value>\r
- <ControlTemplate TargetType="ButtonBase">\r
- <Grid x:Name="RootGrid" Width="100" Background="Transparent">\r
- <StackPanel VerticalAlignment="Top" Margin="0,12,0,11">\r
- <Grid Width="40" Height="40" Margin="0,0,0,5" HorizontalAlignment="Center">\r
- <TextBlock x:Name="BackgroundGlyph" Text="" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0" Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>\r
- <TextBlock x:Name="OutlineGlyph" Text="" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0"/>\r
- <ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="-1,-1,0,0" VerticalAlignment="Center"/>\r
- </Grid>\r
- <TextBlock\r
- x:Name="TextLabel"\r
- Text="{TemplateBinding AutomationProperties.Name}"\r
- Foreground="{StaticResource AppBarItemForegroundThemeBrush}"\r
- Margin="0,0,2,0"\r
- FontSize="12"\r
- TextAlignment="Center"\r
- Width="88"\r
- MaxHeight="32"\r
- TextTrimming="WordEllipsis"\r
- Style="{StaticResource BasicTextStyle}"/>\r
- </StackPanel>\r
- <Rectangle\r
- x:Name="FocusVisualWhite"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="1.5"/>\r
- <Rectangle\r
- x:Name="FocusVisualBlack"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="0.5"/>\r
-\r
- <VisualStateManager.VisualStateGroups>\r
- <VisualStateGroup x:Name="ApplicationViewStates">\r
- <VisualState x:Name="FullScreenLandscape"/>\r
- <VisualState x:Name="Filled"/>\r
- <VisualState x:Name="FullScreenPortrait">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="60"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Snapped">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="60"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="CommonStates">\r
- <VisualState x:Name="Normal"/>\r
- <VisualState x:Name="PointerOver">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Pressed">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Disabled">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="FocusStates">\r
- <VisualState x:Name="Focused">\r
- <Storyboard>\r
- <DoubleAnimation\r
- Storyboard.TargetName="FocusVisualWhite"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- <DoubleAnimation\r
- Storyboard.TargetName="FocusVisualBlack"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Unfocused" />\r
- <VisualState x:Name="PointerFocused" />\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="CheckStates">\r
- <VisualState x:Name="Checked">\r
- <Storyboard>\r
- <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Opacity"/>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundCheckedGlyph" Storyboard.TargetProperty="Visibility">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Unchecked"/>\r
- <VisualState x:Name="Indeterminate"/>\r
- </VisualStateGroup>\r
- </VisualStateManager.VisualStateGroups>\r
- </Grid>\r
- </ControlTemplate>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <!-- \r
- 標準 AppBarButton スタイルは、Button と ToggleButton で使用されます。\r
- \r
- AppBarButton スタイルは、Segoe UI Symbol フォントのグリフごとに用意されます。\r
- 参照するスタイルのコメントを解除します (すべてのスタイルが必要なわけではありません)。 \r
- -->\r
-\r
- <Style x:Key="OpenFileAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OpenFileAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Open File"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
-\r
- <Style x:Key="SaveLocalAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SaveLocalAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Save Local"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
-\r
- <!--\r
- \r
- <Style x:Key="SkipBackAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Skip Back"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SkipAheadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SkipAheadAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Skip Ahead"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PlayAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PlayAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Play"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PauseAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PauseAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Pause"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="EditAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="EditAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Edit"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SaveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SaveAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Save"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DeleteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DeleteAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Delete"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DiscardAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DiscardAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Discard"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RemoveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RemoveAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Remove"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AddAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AddAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Add"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="NoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="NoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="No"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="YesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="YesAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Yes"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MoreAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MoreAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="More"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="HomeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="HomeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Home"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OutAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Out"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="NextAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="NextAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Next"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PreviousAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PreviousAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Previous"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FavoriteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FavoriteAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Favorite"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PhotoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PhotoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Photo"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SettingsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SettingsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Settings"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="VideoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="VideoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Video"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RefreshAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RefreshAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Refresh"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DownloadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DownloadAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Download"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MailAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MailAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Mail"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SearchAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SearchAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Search"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="HelpAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="HelpAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Help"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="UploadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="UploadAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Upload"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="EmojiAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="EmojiAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Emoji"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="TwoPageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="TwoPageAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Two Page"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="LeaveChatAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="LeaveChatAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Upload"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MailForwardAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MailForwardAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Forward Mail"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ClockAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ClockAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Clock"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SendAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SendAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Send"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CropAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CropAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Crop"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RotateCameraAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RotateCameraAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Rotate Camera"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PeopleAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PeopleAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="People"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ClosePaneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ClosePaneAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Close Pane"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OpenPaneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OpenPaneAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Open Pane"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="WorldAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="WorldAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="World"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FlagAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FlagAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Flag"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PreviewLinkAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PreviewLinkAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Preview Link"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="GlobeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="GlobeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Globe"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="TrimAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="TrimAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Trim"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AttachCameraAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AttachCameraAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Attach Camera"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ZoomInAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ZoomInAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Zoom In"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="BookmarksAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="BookmarksAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Bookmarks"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DocumentAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DocumentAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Document"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ProtectedDocumentAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ProtectedDocumentAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Protected Document"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PageAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Page"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="BulletsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="BulletsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Bullets"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CommentAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CommentAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Comment"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="Mail2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="Mail2AppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Mail2"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ContactInfoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ContactInfoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Contact Info"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="HangUpAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="HangUpAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Hang Up"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ViewAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ViewAllAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="View All"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MapPinAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MapPinAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Map Pin"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PhoneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PhoneAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Phone"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="VideoChatAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="VideoChatAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Video Chat"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SwitchAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SwitchAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Switch"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ContactAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ContactAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Contact"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
-\r
- -->\r
-\r
- <!--\r
-\r
- <Style x:Key="RenameAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RenameAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Rename"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PinAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PinAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Pin"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MusicInfoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MusicInfoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Music Info"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="GoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="GoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Go"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="KeyboardAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="KeyboardAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Keyboard"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DockLeftAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DockLeftAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Dock Left"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DockRightAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DockRightAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Dock Right"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DockBottomAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DockBottomAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Dock Bottom"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RemoteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RemoteAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Remote"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SyncAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SyncAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Sync"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RotateAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RotateAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Rotate"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ShuffleAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ShuffleAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Shuffle"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ListAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ListAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="List"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ShopAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ShopAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Shop"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SelectAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SelectAllAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Select All"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OrientationAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OrientationAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Orientation"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ImportAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ImportAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Import"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ImportAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ImportAllAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Import All"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="BrowsePhotosAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="BrowsePhotosAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Browse Photos"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="WebcamAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="WebcamAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Webcam"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="PicturesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PicturesAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Pictures"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SaveLocalAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SaveLocalAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Save Local"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CaptionAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CaptionAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Caption"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="StopAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="StopAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Stop"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ShowResultsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ShowResultsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Show Results"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="VolumeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="VolumeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Volume"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RepairAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RepairAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Repair"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MessageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MessageAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Message"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="Page2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="Page2AppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Page2"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CalendarDayAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CalendarDayAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Day"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CalendarWeekAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CalendarWeekAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Week"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CalendarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CalendarAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Calendar"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CharactersAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CharactersAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Characters"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MailReplyAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MailReplyAllAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Reply All"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ReadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ReadAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Read"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="LinkAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="LinkAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Link"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AccountsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AccountsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Accounts"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ShowBccAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ShowBccAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Show Bcc"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="HideBccAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="HideBccAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Hide Bcc"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="CutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CutAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Cut"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AttachAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AttachAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Attach"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PasteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PasteAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Paste"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FilterAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FilterAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Filter"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CopyAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CopyAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Copy"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="Emoji2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="Emoji2AppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Emoji2"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ImportantAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ImportantAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Important"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MailReplyAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MailReplyAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Reply"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SlideShowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SlideShowAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Slideshow"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SortAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SortAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Sort"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ManageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ManageAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Manage"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AllAppsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AllAppsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="All Apps"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DisconnectDriveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DisconnectDriveAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Disconnect Drive"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MapDriveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MapDriveAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Map Drive"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="NewWindowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="NewWindowAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="New Window"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OpenWithAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OpenWithAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Open With"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ContactPresenceAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ContactPresenceAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Presence"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PriorityAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PriorityAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Priority"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="UploadSkyDriveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="UploadSkyDriveAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Skydrive"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="GoToTodayAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="GoToTodayAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Today"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FontAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FontAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Font"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
-\r
- -->\r
-\r
- <!--\r
-\r
- <Style x:Key="FontColorAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FontColorAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Font Color"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="Contact2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="Contact2AppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Contact"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FolderppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FolderAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Folder"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AudioAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AudioAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Audio"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PlaceholderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PlaceholderAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Placeholder"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ViewAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ViewAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="View"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SetLockScreenAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SetLockscreenAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Set Lockscreen"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SetTitleAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SetTitleAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Set Title"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CcAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CcAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Cc"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="StopSlideShowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="StopSlideshowAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Stop Slideshow"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PermissionsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PermissionsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Permisions"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="HighlightAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="HighlightAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Highlight"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DisableUpdatesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DisableUpdatesAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Disable Updates"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="UnfavoriteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="UnfavoriteAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Unfavorite"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="UnPinAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="UnPinAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Unpin"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OpenLocalAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OpenLocalAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Open Loal"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MuteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MuteAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Mute"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ItalicAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ItalicAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Italic"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="UnderlineAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="UnderlineAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Underline"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="BoldAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="BoldAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Bold"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MoveToFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MoveToFolderAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Move to Folder"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="LikeDislikeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="LikeDislikeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Like/Dislike"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DislikeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DislikeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Dislike"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="LikeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="LikeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Like"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AlignRightAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AlignRightAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Align Right"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AlignCenterAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AlignCenterAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Align Center"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AlignLeftAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AlignLeftAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Align Left"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ZoomAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ZoomAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Zoom"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ZoomOutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ZoomOutAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Zoom Out"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OpenFileAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OpenFileAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Open File"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OtherUserAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OtherUserAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Other User"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AdminAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AdminAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Admin"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="StreetAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="StreetAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Street"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MapAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MapAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Map"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ClearSelectionAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ClearSelectionAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Clear Selection"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FontDecreaseAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FontDecreaseAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Decrease Font"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FontIncreaseAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FontIncreaseAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Increase Font"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FontSizeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FontSizeAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Font Size"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="CellphoneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CellphoneAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Cellphone"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ReshareAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ReshareAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Reshare"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="TagAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="TagAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Tag"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RepeatOneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RepeatOneAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Repeat Once"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="RepeatAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="RepeatAllAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Repeat All"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OutlineStarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OutlineStarAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Outline Star"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SolidStarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SolidStarAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Solid Star"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CalculatorAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CalculatorAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Calculator"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="DirectionsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="DirectionsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Directions"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="TargetAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="TargetAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Target"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="LibraryAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="LibraryAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Library"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PhonebookAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PhonebookAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Phonebook"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MemoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MemoAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Memo"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="MicrophoneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="MicrophoneAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Microphone"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="PostUpdateAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="PostUpdateAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Post Update"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="BackToWindowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="BackToWindowAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Back to Window"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- -->\r
-\r
- <!--\r
- <Style x:Key="FullScreenAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FullScreenAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Full Screen"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="NewFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="NewFolderAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="New Folder"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="CalendarReplyAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="CalendarReplyAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Calendar Reply"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="UnsyncFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="UnsyncFolderAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Unsync Folder"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ReportHackedAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ReportHackedAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Report Hacked"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SyncFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SyncFolderAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Sync Folder"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="BlockContactAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="Block ContactAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="BlockContact"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="SwitchAppsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="SwitchAppsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Switch Apps"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="AddFriendAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="AddFriendAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Add Friend"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="TouchPointerAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="TouchPointerAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Touch Pointer"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="GoToStartAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="GoToStartAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Go to Start"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ZeroBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ZeroBarsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Zero Bars"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="OneBarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="OneBarAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="One Bar"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="TwoBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="TwoBarsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Two Bars"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="ThreeBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="ThreeBarsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Three Bars"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
- <Style x:Key="FourBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">\r
- <Setter Property="AutomationProperties.AutomationId" Value="FourBarsAppBarButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Four Bars"/>\r
- <Setter Property="Content" Value=""/>\r
- </Style>\r
-\r
- -->\r
-\r
- <!-- タイトル領域のスタイル -->\r
-\r
- <Style x:Key="PageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource HeaderTextStyle}">\r
- <Setter Property="TextWrapping" Value="NoWrap"/>\r
- <Setter Property="VerticalAlignment" Value="Bottom"/>\r
- <Setter Property="Margin" Value="0,0,30,40"/>\r
- </Style>\r
-\r
- <Style x:Key="PageSubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource SubheaderTextStyle}">\r
- <Setter Property="TextWrapping" Value="NoWrap"/>\r
- <Setter Property="VerticalAlignment" Value="Bottom"/>\r
- <Setter Property="Margin" Value="0,0,0,40"/>\r
- </Style>\r
-\r
- <Style x:Key="SnappedPageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource PageSubheaderTextStyle}">\r
- <Setter Property="Margin" Value="0,0,18,40"/>\r
- </Style>\r
-\r
- <!--\r
- BackButtonStyle は、ページのタイトル領域で使用する Button をスタイリングするために使用されます。\r
- スタイルの一部として従来のページ レイアウトに適した余白が含まれています。\r
- -->\r
- <Style x:Key="BackButtonStyle" TargetType="Button">\r
- <Setter Property="MinWidth" Value="0"/>\r
- <Setter Property="Width" Value="48"/>\r
- <Setter Property="Height" Value="48"/>\r
- <Setter Property="Margin" Value="36,0,36,36"/>\r
- <Setter Property="VerticalAlignment" Value="Bottom"/>\r
- <Setter Property="FontFamily" Value="Segoe UI Symbol"/>\r
- <Setter Property="FontWeight" Value="Normal"/>\r
- <Setter Property="FontSize" Value="56"/>\r
- <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Back"/>\r
- <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>\r
- <Setter Property="Template">\r
- <Setter.Value>\r
- <ControlTemplate TargetType="Button">\r
- <Grid x:Name="RootGrid">\r
- <Grid Margin="-1,-16,0,0">\r
- <TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>\r
- <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>\r
- <TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>\r
- </Grid>\r
- <Rectangle\r
- x:Name="FocusVisualWhite"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="1.5"/>\r
- <Rectangle\r
- x:Name="FocusVisualBlack"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="0.5"/>\r
-\r
- <VisualStateManager.VisualStateGroups>\r
- <VisualStateGroup x:Name="CommonStates">\r
- <VisualState x:Name="Normal" />\r
- <VisualState x:Name="PointerOver">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Pressed">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <DoubleAnimation\r
- Storyboard.TargetName="ArrowGlyph"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- <DoubleAnimation\r
- Storyboard.TargetName="NormalGlyph"\r
- Storyboard.TargetProperty="Opacity"\r
- To="0"\r
- Duration="0"/>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Disabled">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="FocusStates">\r
- <VisualState x:Name="Focused">\r
- <Storyboard>\r
- <DoubleAnimation\r
- Storyboard.TargetName="FocusVisualWhite"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- <DoubleAnimation\r
- Storyboard.TargetName="FocusVisualBlack"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Unfocused" />\r
- <VisualState x:Name="PointerFocused" />\r
- </VisualStateGroup>\r
- </VisualStateManager.VisualStateGroups>\r
- </Grid>\r
- </ControlTemplate>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <!--\r
- PortraitBackButtonStyle は、縦長のページのタイトル領域で使用する Button をスタイリングするために\r
- 使用されます。スタイルの一部として従来のページ レイアウトに適した余白が含まれています。\r
- -->\r
- <Style x:Key="PortraitBackButtonStyle" TargetType="Button" BasedOn="{StaticResource BackButtonStyle}">\r
- <Setter Property="Margin" Value="26,0,26,36"/>\r
- </Style>\r
-\r
- <!--\r
- SnappedBackButtonStyle は、スナップ ページのタイトル領域で使用する Button をスタイリングするために\r
- 使用されます。スタイルの一部として従来のページ レイアウトに適した余白が含まれています。\r
- \r
- スナップ領域で使用されるグリフは同じグリフの単なる縮小版ではなく実際は別物なので、ここでは明らかな\r
- 重複が必要です。\r
- -->\r
- <Style x:Key="SnappedBackButtonStyle" TargetType="Button">\r
- <Setter Property="MinWidth" Value="0"/>\r
- <Setter Property="Margin" Value="20,0,0,0"/>\r
- <Setter Property="VerticalAlignment" Value="Bottom"/>\r
- <Setter Property="FontFamily" Value="Segoe UI Symbol"/>\r
- <Setter Property="FontWeight" Value="Normal"/>\r
- <Setter Property="FontSize" Value="26.66667"/>\r
- <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>\r
- <Setter Property="AutomationProperties.Name" Value="Back"/>\r
- <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>\r
- <Setter Property="Template">\r
- <Setter.Value>\r
- <ControlTemplate TargetType="Button">\r
- <Grid x:Name="RootGrid" Width="36" Height="36" Margin="-3,0,7,33">\r
- <Grid Margin="-1,-1,0,0">\r
- <TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>\r
- <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonSnappedGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>\r
- <TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>\r
- </Grid>\r
- <Rectangle\r
- x:Name="FocusVisualWhite"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="1.5"/>\r
- <Rectangle\r
- x:Name="FocusVisualBlack"\r
- IsHitTestVisible="False"\r
- Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"\r
- StrokeEndLineCap="Square"\r
- StrokeDashArray="1,1"\r
- Opacity="0"\r
- StrokeDashOffset="0.5"/>\r
-\r
- <VisualStateManager.VisualStateGroups>\r
- <VisualStateGroup x:Name="CommonStates">\r
- <VisualState x:Name="Normal" />\r
- <VisualState x:Name="PointerOver">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Pressed">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- <DoubleAnimation\r
- Storyboard.TargetName="ArrowGlyph"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- <DoubleAnimation\r
- Storyboard.TargetName="NormalGlyph"\r
- Storyboard.TargetProperty="Opacity"\r
- To="0"\r
- Duration="0"/>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Disabled">\r
- <Storyboard>\r
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">\r
- <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>\r
- </ObjectAnimationUsingKeyFrames>\r
- </Storyboard>\r
- </VisualState>\r
- </VisualStateGroup>\r
- <VisualStateGroup x:Name="FocusStates">\r
- <VisualState x:Name="Focused">\r
- <Storyboard>\r
- <DoubleAnimation\r
- Storyboard.TargetName="FocusVisualWhite"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- <DoubleAnimation\r
- Storyboard.TargetName="FocusVisualBlack"\r
- Storyboard.TargetProperty="Opacity"\r
- To="1"\r
- Duration="0"/>\r
- </Storyboard>\r
- </VisualState>\r
- <VisualState x:Name="Unfocused" />\r
- <VisualState x:Name="PointerFocused" />\r
- </VisualStateGroup>\r
- </VisualStateManager.VisualStateGroups>\r
- </Grid>\r
- </ControlTemplate>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-\r
- <!-- アイテム テンプレート -->\r
-\r
- <!-- GroupedItemsPage と ItemsPage に表示される、グリッドに適した 250 ピクセルの四角形のアイテム テンプレート -->\r
- <DataTemplate x:Key="Standard250x250ItemTemplate">\r
- <Grid HorizontalAlignment="Left" Width="250" Height="250">\r
- <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">\r
- <Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>\r
- </Border>\r
- <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">\r
- <TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/>\r
- <TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/>\r
- </StackPanel>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!-- GroupDetailPage に表示される、グリッドに適した 500x130 ピクセルのアイテム テンプレート -->\r
- <DataTemplate x:Key="Standard500x130ItemTemplate">\r
- <Grid Height="110" Width="480" Margin="10">\r
- <Grid.ColumnDefinitions>\r
- <ColumnDefinition Width="Auto"/>\r
- <ColumnDefinition Width="*"/>\r
- </Grid.ColumnDefinitions>\r
- <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">\r
- <Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>\r
- </Border>\r
- <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">\r
- <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>\r
- </StackPanel>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!-- SplitPage に表示される、リストに適した高さ 130 ピクセルのアイテム テンプレート -->\r
- <DataTemplate x:Key="Standard130ItemTemplate">\r
- <Grid Height="110" Margin="6">\r
- <Grid.ColumnDefinitions>\r
- <ColumnDefinition Width="Auto"/>\r
- <ColumnDefinition Width="*"/>\r
- </Grid.ColumnDefinitions>\r
- <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">\r
- <Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>\r
- </Border>\r
- <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">\r
- <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>\r
- </StackPanel>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!--\r
- SplitPage when Filled と、スナップ時に次のページに表示される、リストに適した高さ 80 ピクセルの\r
- アイテム テンプレート: GroupedItemsPage、GroupDetailPage、および ItemsPage\r
- -->\r
- <DataTemplate x:Key="Standard80ItemTemplate">\r
- <Grid Margin="6">\r
- <Grid.ColumnDefinitions>\r
- <ColumnDefinition Width="Auto"/>\r
- <ColumnDefinition Width="*"/>\r
- </Grid.ColumnDefinitions>\r
- <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="60" Height="60">\r
- <Image Source="{Binding Image}" Stretch="UniformToFill"/>\r
- </Border>\r
- <StackPanel Grid.Column="1" Margin="10,0,0,0">\r
- <TextBlock Text="{Binding Title}" Style="{StaticResource ItemTextStyle}" MaxHeight="40"/>\r
- <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>\r
- </StackPanel>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!-- SearchResultsPage に表示される、グリッドに適した 300x70 ピクセルのアイテム テンプレート -->\r
- <DataTemplate x:Key="StandardSmallIcon300x70ItemTemplate">\r
- <Grid Width="294" Margin="6">\r
- <Grid.ColumnDefinitions>\r
- <ColumnDefinition Width="Auto"/>\r
- <ColumnDefinition Width="*"/>\r
- </Grid.ColumnDefinitions>\r
- <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">\r
- <Image Source="{Binding Image}" Stretch="UniformToFill"/>\r
- </Border>\r
- <StackPanel Grid.Column="1" Margin="10,-10,0,0">\r
- <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>\r
- </StackPanel>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!-- SearchResultsPage when Snapped に表示される、リストに適した高さ 70 ピクセルのアイテム テンプレート -->\r
- <DataTemplate x:Key="StandardSmallIcon70ItemTemplate">\r
- <Grid Margin="6">\r
- <Grid.ColumnDefinitions>\r
- <ColumnDefinition Width="Auto"/>\r
- <ColumnDefinition Width="*"/>\r
- </Grid.ColumnDefinitions>\r
- <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">\r
- <Image Source="{Binding Image}" Stretch="UniformToFill"/>\r
- </Border>\r
- <StackPanel Grid.Column="1" Margin="10,-10,0,0">\r
- <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>\r
- <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>\r
- </StackPanel>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!--\r
- FileOpenPickerPage に表示される、ファイルのプレビューを表示するための 190x130 ピクセルの \r
- アイテム テンプレート。タイトルと説明テキストを表示するツールヒントを含みます\r
- -->\r
- <DataTemplate x:Key="StandardFileWithTooltip190x130ItemTemplate">\r
- <Grid>\r
- <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">\r
- <Image\r
- Source="{Binding Image}"\r
- Width="190"\r
- Height="130"\r
- HorizontalAlignment="Center"\r
- VerticalAlignment="Center"\r
- Stretch="Uniform"/>\r
- </Grid>\r
- <ToolTipService.Placement>Mouse</ToolTipService.Placement>\r
- <ToolTipService.ToolTip>\r
- <ToolTip>\r
- <ToolTip.Style>\r
- <Style TargetType="ToolTip">\r
- <Setter Property="BorderBrush" Value="{StaticResource ToolTipBackgroundThemeBrush}" />\r
- <Setter Property="Padding" Value="0" />\r
- </Style>\r
- </ToolTip.Style>\r
-\r
- <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">\r
- <Grid.ColumnDefinitions>\r
- <ColumnDefinition Width="Auto"/>\r
- <ColumnDefinition Width="*"/>\r
- </Grid.ColumnDefinitions>\r
-\r
- <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="20">\r
- <Image\r
- Source="{Binding Image}"\r
- Width="160"\r
- Height="160"\r
- HorizontalAlignment="Center"\r
- VerticalAlignment="Center"\r
- Stretch="Uniform"/>\r
- </Grid>\r
- <StackPanel Width="200" Grid.Column="1" Margin="0,20,20,20">\r
- <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource BodyTextStyle}"/>\r
- <TextBlock Text="{Binding Description}" MaxHeight="140" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Style="{StaticResource BodyTextStyle}"/>\r
- </StackPanel>\r
- </Grid>\r
- </ToolTip>\r
- </ToolTipService.ToolTip>\r
- </Grid>\r
- </DataTemplate>\r
-\r
- <!-- ScrollViewer スタイル -->\r
-\r
- <Style x:Key="HorizontalScrollViewerStyle" TargetType="ScrollViewer">\r
- <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>\r
- <Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>\r
- <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled" />\r
- <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled" />\r
- <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />\r
- </Style>\r
-\r
- <Style x:Key="VerticalScrollViewerStyle" TargetType="ScrollViewer">\r
- <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>\r
- <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>\r
- <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />\r
- <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled" />\r
- <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />\r
- </Style>\r
-\r
- <!-- 通常、ページ レイアウトのルーツでは、エントランス アニメーションとテーマに適した背景色が-->\r
-\r
- <Style x:Key="LayoutRootStyle" TargetType="Panel">\r
- <Setter Property="Background" Value="{StaticResource ApplicationPageBackgroundThemeBrush}"/>\r
- <Setter Property="ChildrenTransitions">\r
- <Setter.Value>\r
- <TransitionCollection>\r
- <EntranceThemeTransition/>\r
- </TransitionCollection>\r
- </Setter.Value>\r
- </Setter>\r
- </Style>\r
-</ResourceDictionary>\r
+++ /dev/null
-<Page
- x:Class="Test.MainPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:Test"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:foo="using:FooEditEngine.Metro"
- mc:Ignorable="d">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="160"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <foo:FooTextBox Grid.Column="1" Name="fooTextBox"/>
- </Grid>
- <Page.BottomAppBar>
- <AppBar Padding="10,0,10,0">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
- <AppBarButton Icon="OpenFile" Label="Open" Click="Button_Click"/>
- <AppBarButton Icon="SaveLocal" Label="Save" Click="Button_Click_1"/>
- </StackPanel>
- </AppBar>
- </Page.BottomAppBar>
-</Page>
+++ /dev/null
-/*
- * Copyright (C) 2013 FooProject
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
-using Windows.Graphics.Printing;
-using Windows.Storage.Pickers;
-using Windows.Storage;
-using Windows.UI.ViewManagement;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
-using Windows.UI.ApplicationSettings;
-using FooEditEngine;
-using FooEditEngine.Metro;
-using FooEditEngine.Test;
-
-// 空白ページのアイテム テンプレートについては、http://go.microsoft.com/fwlink/?LinkId=234238 を参照してください
-
-namespace Test
-{
- /// <summary>
- /// それ自体で使用できる空白ページまたはフレーム内に移動できる空白ページ。
- /// </summary>
- public sealed partial class MainPage : Page
- {
- public MainPage()
- {
- this.InitializeComponent();
- this.Current_ChangedSetting(AppSettings.Current, null);
- InputPane currentView = InputPane.GetForCurrentView();
- currentView.Showing += currentView_Showing;
- currentView.Hiding += currentView_Hiding;
- PrintManager.GetForCurrentView().PrintTaskRequested += MainPage_PrintTaskRequested;
- }
-
- void MainPage_PrintTaskRequested(PrintManager sender, PrintTaskRequestedEventArgs args)
- {
- FooPrintText printtext = new FooPrintText();
- printtext.Fotter = "fotter";
- printtext.Header = "header";
- printtext.Padding = new FooEditEngine.Padding(20, 20, 20, 20);
- printtext.Print(args.Request, "Text Print", this.fooTextBox);
- }
-
- /// <summary>
- /// このページがフレームに表示されるときに呼び出されます。
- /// </summary>
- /// <param name="e">このページにどのように到達したかを説明するイベント データ。Parameter
- /// プロパティは、通常、ページを構成するために使用します。</param>
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- AppSettings.Current.ChangedSetting += Current_ChangedSetting;
- }
-
- void currentView_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)
- {
- this.fooTextBox.Margin = new Thickness(0);
- args.EnsuredFocusedElementInView = true;
- }
-
- void currentView_Showing(InputPane sender, InputPaneVisibilityEventArgs args)
- {
- this.fooTextBox.Margin = new Thickness(0, 0, 0, args.OccludedRect.Height);
- args.EnsuredFocusedElementInView = true;
- }
-
- void Current_ChangedSetting(object sender, EventArgs e)
- {
- AppSettings setting = (AppSettings)sender;
- this.fooTextBox.FlowDirection = setting.IsRTL ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
- this.fooTextBox.DrawCaretLine = setting.ShowLineMarker;
- this.fooTextBox.DrawLineNumber = setting.ShowLineNumber;
- this.fooTextBox.DrawRuler = setting.ShowRuler;
- if (setting.HilightXML)
- {
- System.Diagnostics.Debug.WriteLine("hilight enable");
- this.fooTextBox.Hilighter = new XmlHilighter();
- this.fooTextBox.LayoutLineCollection.HilightAll();
- }
- else
- {
- System.Diagnostics.Debug.WriteLine("hilight disable");
- this.fooTextBox.Hilighter = null;
- this.fooTextBox.LayoutLineCollection.ClearHilight();
- }
- this.fooTextBox.Visibility = setting.IsVisible ? Visibility.Visible : Visibility.Collapsed;
- this.fooTextBox.LineBreakMethod = setting.CurrentLineBreakMethod.Method;
- this.fooTextBox.LineBreakCharCount = 50;
- this.fooTextBox.PerfomLayouts();
- this.fooTextBox.Refresh();
- }
-
- private async void Button_Click(object sender, RoutedEventArgs e)
- {
- FileOpenPicker openPicker = new FileOpenPicker();
-
- openPicker.ViewMode = PickerViewMode.List;
-
- // ファイル形式
- openPicker.FileTypeFilter.Add("*");
-
- // 最初に表示される場所
- openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
-
- StorageFile file = await openPicker.PickSingleFileAsync();
- if (file != null)
- {
- this.fooTextBox.IsEnabled = false;
- using (Stream stream = await file.OpenStreamForReadAsync())
- using(StreamReader reader = new StreamReader(stream))
- {
- await this.fooTextBox.LoadFileAsync(reader,null);
- this.fooTextBox.FoldingStrategy = new CharFoldingMethod('{', '}');
- this.fooTextBox.LayoutLineCollection.GenerateFolding();
- this.fooTextBox.IsEnabled = true;
- this.fooTextBox.Refresh();
- }
- }
- }
-
- private async void Button_Click_1(object sender, RoutedEventArgs e)
- {
- FileSavePicker savePicker = new FileSavePicker();
- savePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
- savePicker.FileTypeChoices.Add("Text Types", new List<string>() { ".txt" });
- savePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
- StorageFile file = await savePicker.PickSaveFileAsync();
- if (file != null)
- {
- using (Stream stream = await file.OpenStreamForWriteAsync())
- using (StreamWriter writer = new StreamWriter(stream))
- {
- await this.fooTextBox.SaveFile(writer,null);
- }
- }
- }
-
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
- <Identity Name="1ab14b77-81c2-4076-87b6-36302a7a6d6e" Publisher="CN=neko" Version="1.1.0.0" />
- <Properties>
- <DisplayName>Test</DisplayName>
- <PublisherDisplayName>rirufa</PublisherDisplayName>
- <Logo>Assets\StoreLogo.png</Logo>
- </Properties>
- <Prerequisites>
- <OSMinVersion>6.3.0</OSMinVersion>
- <OSMaxVersionTested>6.3.0</OSMaxVersionTested>
- </Prerequisites>
- <Resources>
- <Resource Language="x-generate" />
- </Resources>
- <Applications>
- <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Test.App">
- <Extensions>
- <Extension Category="windows.fileOpenPicker">
- <FileOpenPicker>
- <SupportedFileTypes>
- <SupportsAnyFileType />
- </SupportedFileTypes>
- </FileOpenPicker>
- </Extension>
- <Extension Category="windows.fileSavePicker">
- <FileSavePicker>
- <SupportedFileTypes>
- <SupportsAnyFileType />
- </SupportedFileTypes>
- </FileSavePicker>
- </Extension>
- <Extension Category="windows.fileTypeAssociation">
- <FileTypeAssociation Name="supperted_document">
- <SupportedFileTypes>
- <FileType ContentType="text/plain">.txt</FileType>
- </SupportedFileTypes>
- </FileTypeAssociation>
- </Extension>
- </Extensions>
- <m2:VisualElements DisplayName="Test" Description="Test" BackgroundColor="#464646" ForegroundText="light" Square150x150Logo="Assets\Logo.png" Square30x30Logo="Assets\SmallLogo.png">
- <m2:DefaultTile>
- <m2:ShowNameOnTiles>
- <m2:ShowOn Tile="square150x150Logo" />
- </m2:ShowNameOnTiles>
- </m2:DefaultTile>
- <m2:SplashScreen Image="Assets\SplashScreen.png" />
- </m2:VisualElements>
- </Application>
- </Applications>
- <Capabilities>
- <Capability Name="documentsLibrary" />
- </Capabilities>
-</Package>
\ No newline at end of file
+++ /dev/null
-using System.Reflection;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-\r
-// アセンブリに関する情報は、次の属性のセットを通して制御されます。\r
-// アセンブリに関連付けられている情報を変更するには、\r
-// これらの属性値を変更してください。\r
-[assembly: AssemblyTitle("Test")]\r
-[assembly: AssemblyDescription("")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("")]\r
-[assembly: AssemblyProduct("Test")]\r
-[assembly: AssemblyCopyright("Copyright © 2013")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:\r
-//\r
-// メジャー バージョン\r
-// マイナー バージョン \r
-// ビルド番号\r
-// リビジョン\r
-//\r
-// すべての値を指定するか、以下のように '*' を使用してビルドおよびリビジョン番号を\r
-// 既定値にすることができます:\r
-// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("1.0.0.0")]\r
-[assembly: AssemblyFileVersion("1.0.0.0")]\r
-[assembly: ComVisible(false)]
\ No newline at end of file
+++ /dev/null
-<SettingsFlyout\r
- x:Class="Test.SettingsFlyout1"\r
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
- xmlns:local="using:Test"\r
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"\r
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"\r
- mc:Ignorable="d"\r
- Title="設定"\r
- IconSource="Assets/SmallLogo.png" \r
- >\r
-\r
- <StackPanel x:Name="Content" Style="{StaticResource SettingsFlyoutSectionStyle}">\r
- <ToggleSwitch Margin="-6, 0, 0, 0" IsOn="{Binding IsRTL,Mode=TwoWay}" Header = "右から左に表示する" HorizontalAlignment="Stretch"/>\r
- <ToggleSwitch Margin="-6, 0, 0, 0" IsOn="{Binding ShowRuler,Mode=TwoWay}" Header = "ルーラを表示する" HorizontalAlignment="Stretch"/>\r
- <ToggleSwitch Margin="-6, 0, 0, 0" IsOn="{Binding ShowLineNumber,Mode=TwoWay}" Header = "行番号を表示する" HorizontalAlignment="Stretch"/>\r
- <ToggleSwitch Margin="-6, 0, 0, 0" IsOn="{Binding ShowLineMarker,Mode=TwoWay}" Header = "キャレットラインを表示する" HorizontalAlignment="Stretch"/>\r
- <ToggleSwitch Margin="-6, 0, 0, 0" IsOn="{Binding HilightXML,Mode=TwoWay}" Header = "XMLドキュメントのハイライトを行う" HorizontalAlignment="Stretch"/>\r
- <ToggleSwitch Margin="-6, 0, 0, 0" IsOn="{Binding IsVisible,Mode=TwoWay}" Header = "Visiblity is visible" HorizontalAlignment="Stretch"/>\r
- <ComboBox ItemsSource="{Binding LineBreakMethodList}" SelectedItem="{Binding CurrentLineBreakMethod,Mode=TwoWay}">\r
- <ComboBox.ItemTemplate>\r
- <DataTemplate>\r
- <TextBlock Text="{Binding Title}"/>\r
- </DataTemplate>\r
- </ComboBox.ItemTemplate>\r
- </ComboBox>\r
- </StackPanel>\r
-</SettingsFlyout>
\ No newline at end of file
+++ /dev/null
-/*\r
- * Copyright (C) 2013 FooProject\r
- * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\r
-\r
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of \r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-using System;\r
-using System.Collections.Generic;\r
-using System.IO;\r
-using System.Linq;\r
-using Windows.Foundation;\r
-using Windows.Foundation.Collections;\r
-using Windows.UI.Xaml;\r
-using Windows.UI.Xaml.Controls;\r
-using Windows.UI.Xaml.Controls.Primitives;\r
-using Windows.UI.Xaml.Data;\r
-using Windows.UI.Xaml.Input;\r
-using Windows.UI.Xaml.Media;\r
-using Windows.UI.Xaml.Navigation;\r
-\r
-// 空白ページのアイテム テンプレートについては、http://go.microsoft.com/fwlink/?LinkId=234238 を参照してください\r
-\r
-namespace Test\r
-{\r
- /// <summary>\r
- /// それ自体で使用できる空白ページまたはフレーム内に移動できる空白ページ。\r
- /// </summary>\r
- public sealed partial class SettingsFlyout1 : SettingsFlyout\r
- {\r
- public SettingsFlyout1()\r
- {\r
- this.InitializeComponent();\r
- this.Content.DataContext = AppSettings.Current;\r
- }\r
- }\r
-}\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{D5A54EBE-15AC-48E9-819B-99314266B683}</ProjectGuid>
- <OutputType>AppContainerExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Test</RootNamespace>
- <AssemblyName>Test</AssemblyName>
- <DefaultLanguage>ja-JP</DefaultLanguage>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PackageCertificateKeyFile>Test_TemporaryKey.pfx</PackageCertificateKeyFile>
- <AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
- <TargetPlatformVersion>8.1</TargetPlatformVersion>
- <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
- <TargetFrameworkVersion />
- <PackageCertificateThumbprint>EA35893B9079E8FF7C38A44C19AD824F8A9E3DDC</PackageCertificateThumbprint>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\ARM\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
- <OutputPath>bin\ARM\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>ARM</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
- <OutputPath>bin\x64\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
- <NoWarn>;2008</NoWarn>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
- <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
- <Optimize>true</Optimize>
- <NoWarn>;2008</NoWarn>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <Compile Include="AppSettings.cs" />
- <Compile Include="MainPage.xaml.cs">
- <DependentUpon>MainPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="SettingsFlyout.xaml.cs">
- <DependentUpon>SettingsFlyout.xaml</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <AppxManifest Include="Package.appxmanifest">
- <SubType>Designer</SubType>
- </AppxManifest>
- </ItemGroup>
- <ItemGroup>
- <Content Include="Assets\Logo.png" />
- <Content Include="Assets\SmallLogo.png" />
- <Content Include="Assets\SplashScreen.png" />
- <Content Include="Assets\StoreLogo.png" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- <Page Include="Common\StandardStyles.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="MainPage.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="SettingsFlyout.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\FooEditEngine\FooEditEngine.csproj">
- <Project>{ac23ebf4-4cd0-43ea-9808-0e6dcd12e791}</Project>
- <Name>FooEditEngine</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="Test_TemporaryKey.pfx" />
- </ItemGroup>
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
- <VisualStudioVersion>12.0</VisualStudioVersion>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file