teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

不正な編集対応

2017/11/09 07:54

投稿

cancat
cancat

スコア313

title CHANGED
@@ -1,1 +1,1 @@
1
- 回答がな。回答がない。
1
+ Tileにイメージを表示した
body CHANGED
@@ -1,1 +1,66 @@
1
+ こんにちは。
2
+ Windows10でUWPのアプリケーションを開発しています。
3
+ Visual Studio 2017 Communityを使っています。
4
+
5
+ ###前提・実現したいこと
6
+ Tileにイメージを表示したいです。
7
+ 標準でイメージは出るものの、タイルに文字を表示している状態では、そのイメージがなく、単なるブルーバックになります。
8
+ 文字を表示するときにもイメージを表示するにはどうすればよいでしょう?
9
+
10
+
11
+ ###試したこと
12
+ NuGetでNotificationExtensions.Win10を入れました。
13
+
14
+ ###発生している問題・エラーメッセージ
15
+ 標準でイメージは出るものの、タイルに文字を表示している状態では、そのイメージがなく、単なるブルーバックになります。
16
+
17
+ ###該当のソースコード
18
+ ```C#
19
+
20
+ string title = "title";
21
+ string contenttext = "content";
22
+ var bindingContent = new TileBindingContentAdaptive
23
+ {
24
+ PeekImage = new TilePeekImage
25
+ {
1
- 回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。
26
+ Source = "Assets/Wide310x150Logo.scale-150.png"//<=ここでimage指定
27
+ },
28
+ Children =
29
+ {
30
+ new TileText{Text = title},
31
+ new TileText{Text = contenttext, Style=TileTextStyle.Caption}
32
+ }
33
+ };
34
+
35
+ var tileBinding = new TileBinding
36
+ {
37
+ Branding = TileBranding.NameAndLogo,
38
+ Content = bindingContent,
39
+ DisplayName = "MyNote",
40
+ };
41
+
42
+ var content = new TileContent
43
+ {
44
+ Visual = new TileVisual
45
+ {
46
+ TileSmall = tileBinding,
47
+ TileMedium = tileBinding,
48
+ TileLarge = tileBinding,
49
+ TileWide = tileBinding,
50
+ }
51
+ };
52
+
53
+ var n = new TileNotification(content.GetXml());
54
+ TileUpdateManager.CreateTileUpdaterForApplication()
55
+ .Update(n);
56
+
57
+ ```
58
+
59
+ ###補足情報(言語/FW/ツール等のバージョンなど)
60
+ Microsoft Visual Studio Community 2017
61
+ Version 15.0.26228.9 D15RTWSVC
62
+ Microsoft .NET Framework
63
+ Version 4.6.01586
64
+
65
+ です。
66
+ よろしくお願いします。

2

回答がない。

2017/11/09 07:54

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- ボタンのコンテキストメニューに、フォントメニューを実装した
1
+ 回答がな。回答がない。
body CHANGED
@@ -1,56 +1,1 @@
1
- こんにちは。
2
- Windows10でWPFのアプリケーションを開発しています。
3
- Visual Studio 2017 Communityを使っています。
4
-
5
- ###前提・実現したいこと
6
- WPFのボタンのコンテキストメニューに、フォントメニューを実装したいです。
7
- 下記サイトを参照して、ListBoxをContextMenuにしようとしました、ListBoxにはあるItemTemplateの機能、ContextMenuにはないみたい。
1
+ 回答ない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。回答がない。
8
- どのように回避したらよいですか?
9
-
10
- ###試したこと
11
-
12
- ###発生している問題・エラーメッセージ
13
- ListBoxにはあるItemTemplateの機能が、ContextMenuにはない。
14
-
15
- ###該当のソースコード
16
- ```xaml
17
- original --http://sourcechord.hatenablog.com/entry/2014/04/25/013631
18
- <ListBox Width="200"
19
- Margin="10"
20
- HorizontalAlignment="Left"
21
- ItemsSource="{Binding FontList}">
22
- <ListBox.ItemTemplate>
23
- <DataTemplate>
24
- <TextBlock FontFamily="{Binding}"
25
- FontSize="16"
26
- Text="{Binding Converter={StaticResource FontFamilyToNameConverter},
27
- Mode=OneWay}" />
28
- </DataTemplate>
29
- </ListBox.ItemTemplate>
30
- </ListBox>
31
-
32
- ```
33
-
34
- ```xaml
35
- <Button x:Name="Font" Click="OnFontMenuClick">
36
- <Button.ContextMenu ItemsSource="{Binding FontList}">
37
- <ItemTemplate>
38
- <DataTemplate>
39
- <TextBlock FontFamily="{Binding}"
40
- FontSize="16"
41
- Text="{Binding Converter={StaticResource FontFamilyToNameConverter},
42
- Mode=OneWay}" />
43
- </DataTemplate>
44
- </ItemTemplate>
45
- </Button.ContextMenu> Font</Button>
46
- ```
47
-
48
-
49
- ###補足情報(言語/FW/ツール等のバージョンなど)
50
- Microsoft Visual Studio Community 2017
51
- Version 15.0.26228.9 D15RTWSVC
52
- Microsoft .NET Framework
53
- Version 4.6.01586
54
-
55
- です。
56
- よろしくお願いします。

1

add

2017/10/30 13:33

投稿

cancat
cancat

スコア313

title CHANGED
File without changes
body CHANGED
File without changes