J's profileC#とかSharePointとかVistaとかPhotosBlogListsMore Tools Help

J

Occupation
Location
Interests
パソコン好きなおっさんです。
新しいことが大好き。日々これ精進ですな。
Photo 1 of 10

C#とかSharePointとかVistaとか

9/11/2007

Windows Live Translator beta

Windows Live Translator

Microsoftの翻訳サイトがBeta版として公開されています。

面白いのは表示モードが4種類あることですね。

原文と訳文を左右、上下に並べることができます。
このとき、マウスが乗っている文章が、原文、訳文ともにハイライトされます。

また、原文のみを表示した場合は、マウスが乗っている文章の訳文がツールチップのように表示されます。
逆に、訳文のみのときは、原文がツールチップになります。

自動翻訳だと訳文の方が意味がわからないことも多いので、原文と見比べられるのは便利ですね。

HorizontalVertical

Original Translation

8/10/2007

Windows Live SkyDrive!

Microsoftのフリーの共有フォルダの名前がWindows Live SkyDriveに決まりましたね。

詳しくはこちら

早く、日本でも使えるようになるといいな。

7/24/2007

WPFの日本語ヘルプ

いまさらだけど、メモ。

MSDN : Windows Presentation Foundation

7/10/2007

SimpleBinding & EvalBinding - Blendables

さて本題。

IdentityMine社のBlendablesがすごい。

Zoomboxもすごいんだけど、今回はSimpleBindingとEvalBindingに注目。

前回のポストで、自分自身のプロパティにアクセスするには、

Height="{Binding RelativeSource={RelativeSource self}, Path=Width}

って書いたけど、SimpleBindingを使うとこうなる。

{blendables:SimpleBinding [{Self}.Width]}

あら、簡単。

しかもEvalBindingを使うとこうなる。

{blendables:EvalBinding [{Self}.Width]/2}

なんと、Binding内で演算が可能なのだ。これは便利!

サンプルコード

<Window x:Class="WindowsApplication5.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:blendables="http://schemas.identitymine.com/blendables"
    Title="WindowsApplication5" Height="300" Width="300"
    >
  <StackPanel>
    <Slider Value="100"
            Minimum="0"
            Maximum="{blendables:SimpleBinding [{Self}.ActualWidth]}"
            x:Name="EllipseSize" />
    <Grid>
      <Ellipse Fill="Red"
               Width="{Binding ElementName=EllipseSize, Path=Value}"
               Height="{blendables:EvalBinding [{Self}.Width]/2}" />
      <Ellipse Fill="Blue"
               Width="{blendables:EvalBinding [EllipseSize.Value]/4}"
               Height="{blendables:EvalBinding [{Self}.Width]*2}" />
    </Grid>
  </StackPanel>
</Window>

image

Self Binding

自分自身のプロパティとバインドしたいときは、次のように書く。

Height="{Binding RelativeSource={RelativeSource self}, Path=Width}

サンプルはこんな感じ。

<Window x:Class="WindowsApplication5.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WindowsApplication5" Height="300" Width="300"
    >
  <StackPanel>
    <Slider Value="100"
            Minimum="0"
            Maximum="{Binding RelativeSource={RelativeSource self}, Path=ActualWidth}"
            x:Name="EllipseSize" />
    <Ellipse Fill="Red"
             Width="{Binding ElementName=EllipseSize, Path=Value}"
             Height="{Binding RelativeSource={RelativeSource self}, Path=Width}" />
  </StackPanel>
</Window>

image

 
このスペースにアクセスしていただき、ありがとうございます。
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.