<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/nina_a/">
    <title>メモ帳ブログ @ wiki</title>
    <link>http://w.atwiki.jp/nina_a/</link>
    <atom:link href="https://w.atwiki.jp/nina_a/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>メモ帳ブログ @ wiki</description>

    <dc:language>ja</dc:language>
    <dc:date>2017-07-31T21:35:43+09:00</dc:date>
    <utime>1501504543</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/68.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/67.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/66.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/65.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/64.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/63.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/62.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/61.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/60.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/nina_a/pages/59.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/68.html">
    <title>コメント/WPF/ゴースト付きのドラッグ・アンド・ドロップ</title>
    <link>https://w.atwiki.jp/nina_a/pages/68.html</link>
    <description>
      -古い記事にコメントスミマセン。Formの外にはゴーストは表示出来ないでしょうか - てんてん 2017-07-31 21:35:43      </description>
    <dc:date>2017-07-31T21:35:43+09:00</dc:date>
    <utime>1501504543</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/67.html">
    <title>comment</title>
    <link>https://w.atwiki.jp/nina_a/pages/67.html</link>
    <description>
      - ラグランジュの未定乗数法の解説、とってもわかりやすかったです。 &amp;br()KKT条件がなぜそうなるかについてもわかりやすかった。 &amp;br()絵的に理解できました。 &amp;br()ありがとう。  &amp;br() --  (たく)  &amp;size(80%){2013-07-16 23:46:08}     </description>
    <dc:date>2013-07-16T23:46:08+09:00</dc:date>
    <utime>1373985968</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/66.html">
    <title>WPF/Canvasによるドラッグ・アンド・ドロップ</title>
    <link>https://w.atwiki.jp/nina_a/pages/66.html</link>
    <description>
      *Canvasを使ったドラッグ・アンド・ドロップ（D&amp;D）
#right(){&amp;link_edit(text=このページを編集)}

**概要
Canvasを使ってドラッグ操作，およびドロップ操作を実現する．サンプルとしてItemsControlのアイテムをドラッグで削除するプログラムを作成する．

情報元
Charles Petzold：[[The Ins and Outs of ItemsControl&gt;&gt;http://msdn.microsoft.com/en-us/magazine/ff714594.aspx]]，MSDN Magazine

**ItemsControl

#region(GhostAlignment.cs)
GhostAlignment.cs
#codehighlight(C#){{
public enum GhostAlignment
{
    BottomCenter,
    BottomLeft,
    BottomRight, 
    MiddleCenter,
    MiddleLeft, 
    MiddleRight,
    TopCenter,
    TopLeft,
    TopRight
} }}
#endregion

----

#center(){カテゴリ：[[WPF&gt;&gt;Category:WPF]]}

#pcomment()

&amp;br()&amp;br()&amp;br()&amp;br()&amp;br()    </description>
    <dc:date>2012-03-29T00:23:24+09:00</dc:date>
    <utime>1332948204</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/65.html">
    <title>[Java] 変換</title>
    <link>https://w.atwiki.jp/nina_a/pages/65.html</link>
    <description>
      *変換
#right(){&amp;link_edit(text=このページを編集)}

**文字列&lt;--&gt;各種オブジェクトの変換

***バイト列

****バイト列 -&gt; 文字列
#codehighlight(Java){{
byte[] str_bytes = new byte[]{0x41, 0x42, 0x43}; // ABC
String str = new String(str_bytes); }}
符号化方法を指定する場合
#codehighlight(Java){{
byte[] str_bytes = new byte[]{0x41, 0x42, 0x43}; // ABC
String str = new String(str_bytes, &quot;UTF-8&quot;); }}

****文字列 -&gt; バイト列
#codehighlight(Java){{
String str = &quot;ABC&quot;;
byte[] str_bytes = str.getBytes();}}
符号化方法を指定する場合
#codehighlight(Java){{
String str = &quot;ABC&quot;;
byte[] str_bytes = str.getBytes(&quot;UTF-8&quot;);}}

****バイト列 -&gt; 16進数表現文字列
#codehighlight(Java){{
public String bytes2hexString(byte[] array)
{
    if(array == null)
        throw new IllegalArgumentException(new NullPointerException());

    char[] c=new char[array.length*2];

    int tmp;

    for(int y=0, x=-1; y &lt; array.length; ++y)
    {
        tmp = (array[y]&gt;&gt;4) &amp; 0x0F;	
        c[++x]=(char)(tmp&gt;9 ? tmp+&#039;A&#039;-10 : tmp+&#039;0&#039;);	
        tmp = array[y] &amp; 0x0F;	
    </description>
    <dc:date>2011-12-06T13:40:08+09:00</dc:date>
    <utime>1323146408</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/64.html">
    <title>[XML] XMLスキーマ</title>
    <link>https://w.atwiki.jp/nina_a/pages/64.html</link>
    <description>
      *XMLスキーマ
#right(){&amp;link_edit(text=このページを編集)}

#contents(fromhere=true)

#divclass(info){{
このページはある程度XMLを知っている人や、XMLスキーマを何となく知っている人でないと分からないと思います。}}
//
//
//
//
//
**XMLスキーマとは
XMLスキーマはXMLの要素の名前やその出現位置や回数などを定義する文書です。XMLスキーマの基本形は以下のようになっています。以下は文字列をコンテンツとして持つdefinitionという要素を定義するXMLスキーマです。
#region(XMLスキーマの雛形)
#codehighlight(XML){{
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
            xmlns:n=&quot;http://xml.nna.com&quot;
            targetNamespace=&quot;http://xml.nna.com&quot;&gt;
    &lt;!-- 定義ここから --&gt;
    &lt;xsd:element name=&quot;definition&quot; type=&quot;xsd:string&quot; /&gt;
    &lt;!-- 定義ここまで --&gt;
&lt;/xsd:schema&gt;
}}
#endregion
//
//
//
//
//
**要素を定義する
XMLの要素を定義するにはelementを使用します。
#codehighlight(XML){{
&lt;xsd:element name=&quot;要素名&quot; type=&quot;型名&quot; /&gt;}}
型は既存の物ではなくその場で作成してもかまいません。このelement内で型を定義した場合，型の名前を省略することができて、この型のことを匿名型といいます。
#codehighlight(XML){{
&lt;xsd:element name=&quot;要素名&quot;&gt;
    &lt;!-- ここに型の定義を書く --&gt;
&lt;/xsd:element&gt;}}
要素を別の場所で定義しておいてそれを参照することが出来ます。
#codehighlight(XML){{
&lt;    </description>
    <dc:date>2011-11-14T18:42:55+09:00</dc:date>
    <utime>1321263775</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/63.html">
    <title>コメント/WPF/装飾レイヤー</title>
    <link>https://w.atwiki.jp/nina_a/pages/63.html</link>
    <description>
      -aasasaw - aa 2011-07-13 13:16:41  
-ああ - あああ 2012-03-27 16:33:39  
-あああ - あああ 2012-03-27 16:33:58  
-aaa - aaa 2012-03-29 18:19:11  
-aaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaa 2013-05-24 16:42:23  
-ｐ - ｐ 2014-06-12 13:30:36  
-r - r 2014-09-12 15:05:14  
-あｄふぁ - あああ 2014-09-24 14:54:01  
-てて - ててて (2024-01-06 12:19:46)     </description>
    <dc:date>2024-01-06T12:19:46+09:00</dc:date>
    <utime>1704511186</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/62.html">
    <title>MISC</title>
    <link>https://w.atwiki.jp/nina_a/pages/62.html</link>
    <description>
      #redirect(Category:MISC)    </description>
    <dc:date>2011-04-11T00:57:15+09:00</dc:date>
    <utime>1302451035</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/61.html">
    <title>WPF/テンプレート</title>
    <link>https://w.atwiki.jp/nina_a/pages/61.html</link>
    <description>
      *テンプレート（Templates）
#right(){&amp;link_edit(text=このページを編集)}

**概要
すべての[[WPF]]コントロールは&quot;見た目&quot;を持たないように設計されている．ただし，既定の見た目を持っており，これからVisualTreeが作成される．この見た目を決めるものがコントロールテンプレートと呼ばれるものであり，XAMLで定義されている．

***コントロールの標準のテンプレートを表示する
このプログラムは[[Matthew MacDonald：Pro WPF in C# 2010 Windows Presentation Foundation in .Net 4&gt;&gt;http://www.apress.com/book/view/9781430272052]]に掲載されているものをもとに作成した．
#region(コントロールの標準のテンプレートを表示するサンプルプログラム)
XAML
#codehighlight(XML){{
&lt;Window x:Class=&quot;WpfSampleApplication.MainWindow&quot;
        xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
        xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
        Title=&quot;MainWindow&quot; Height=&quot;600&quot; Width=&quot;1000&quot;
        Loaded=&quot;Window_Loaded&quot;&gt;

    &lt;StackPanel Orientation=&quot;Horizontal&quot; Name=&quot;layoutRoot&quot;&gt;
        &lt;TreeView Name=&quot;lstTypes&quot; SelectedItemChanged=&quot;lstTypes_SelectedItemChanged&quot; Width=&quot;400&quot;/&gt;
        &lt;TextBox Name=&quot;txtTemplate&quot; Width=&quot;600&quot; HorizontalScrollBarVisibility=&quot;Auto&quot; VerticalScrollBarVisibility    </description>
    <dc:date>2011-04-11T00:52:06+09:00</dc:date>
    <utime>1302450726</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/60.html">
    <title>WPF/装飾レイヤー</title>
    <link>https://w.atwiki.jp/nina_a/pages/60.html</link>
    <description>
      *装飾レイヤー（Adorner Layer）
#right(){&amp;link_edit(text=このページを編集)}

**装飾レイヤーとは
装飾対象であるエレメントやコレクションの前面に存在するレイヤーでAdornerを描画する層である．イメージとしては画面上のエレメントなどの上に透明のアクリル板があって，そのアクリル板に描画することで，画面上のエレメントを装飾するというもの．

***サンプル
#region(テキストボックスの入力が数字以外であった場合にエラーを表示する)
XAML
#codehighlight(XML){{
&lt;Window x:Class=&quot;WpfSampleApplication.MainWindow&quot;
        xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
        xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
        Title=&quot;MainWindow&quot; Height=&quot;400&quot; Width=&quot;500&quot;&gt;

    &lt;Grid x:Name=&quot;LayoutRoot&quot;&gt;
        &lt;Grid.RowDefinitions&gt;
            &lt;RowDefinition Height=&quot;*&quot; /&gt;
            &lt;RowDefinition Height=&quot;*&quot; /&gt;
        &lt;/Grid.RowDefinitions&gt;
        &lt;TextBox Width=&quot;200&quot; Height=&quot;100&quot; LostKeyboardFocus=&quot;OnKeyFocusLost_1&quot;/&gt;
        &lt;TextBox Width=&quot;200&quot; Height=&quot;100&quot; LostKeyboardFocus=&quot;OnKeyFocusLost_2&quot; Grid.Row=&quot;1&quot;/&gt;
    &lt;/Grid&gt;
&lt;/Window&gt;}}
C#
#codehighlight(C#){{
using System;
using System.Collections.Generic;
using System.Linq    </description>
    <dc:date>2011-04-11T00:50:54+09:00</dc:date>
    <utime>1302450654</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/nina_a/pages/59.html">
    <title>WPF</title>
    <link>https://w.atwiki.jp/nina_a/pages/59.html</link>
    <description>
      #redirect(Category:WPF)    </description>
    <dc:date>2011-04-09T02:44:16+09:00</dc:date>
    <utime>1302284656</utime>
  </item>
  </rdf:RDF>
