Wednesday, October 8, 2008

Statement Of Confidentiality Generic

PDC08: new XAML features

XAML is the declarative programming language.. NET

you mainly finds application in WPF, but also in WF and WCF

On the PDC, a session will revolve around XAML. It is shown how an application written entirely declaratively in XAML can be.

XAML is also combined with XOML from the Workflow Foundation. It will be interesting how XAML applications will be extended.

New XAML features will be:
- support for generics
- object references
- non default constructors


cu @ PDC
Benjamin

Lginternetkit Mfc Application Has Stopped Working

C # 4.0: dynamic

C # is dynamic!


The first publicized feature of C # 4.0 are dynamic lookups. These are the new key - allows - dynamic .


Dynamic lookups allow you to resolve names at run time and not at compile time. This means that this is a new runtime features, as a language feature of C #. All. NET languages can then use these dynamic lookup. VB.NET was able to implement this scenario already - better known as "late binding" - but had to deafür own methods to draw from the Microsoft.VisualBasic.dll. (This is why you had to always deploy this DLL when to program. NET VB has).


Dynamic lookups in the DLR (Dynamic Language Runtime) and implements necessary for dynamic languages.


The following example is the slides of the keynote by Anders on JAOO Hejsberg taken






Wednesday, September 10, 2008

Rhinestone For Brazillan Wax

Oslo and D #

While the PDC drawing ever closer, the first highly anticipated new features are known. Among other things, more and more details to light, to the long-awaited platform Oslo, be part of. NET Framework 4.0.

Don Box is one of the architects of Oslo and is on his blog small hidden clues. Today, he pointed to an interesting article , the more secrets to reveal Oslo.

LINQ After this year will be another hammer will be presented:
Textual Domain Specific Languages (DSL)

Microsoft already can create a DSL toolkit with which one graphical DSL. These can then be used for a designer in visual studio. The novelty and denOslo DSL is that they function as its own programming language, so textually. This TDSL based on the Microsoft Research Project TLA + (T-L-emporalen ogik the A-ACTION) is

the way, the code name for this TDSL "D".
Maybe we can get to C # now a D #?

CU at PDC
Benjamin

Thursday, June 12, 2008

Story To Make You Get An Erecciion

I kooomme ... or not ...

Actually I wanted to spend this fall again two weeks in the desert. As I put my horse also because the priorities otherwise use, this year is nothing more of it. Next year I plan but again a desert trip - the longing for the desert will be with me always.

Wednesday, May 28, 2008

Honeymoon Gift Basket, Hawaii

PDC2008 I'm coming

At the last PDC I've yet seen all the sessions online.

Now I'm here LIVE!

topics will be:

- The Live Developer Platform, including the MESH.
- Cloud Computing "! From computation, to storage and much more
- Visual Studio 10" and
NET Framework 4.0 -. V.next including ASP.NET Futures of MVC, Ajax and Dynamic Data
- Silverlight Futures, including for Silverlight business applications
- And much, much more.

Thursday, May 8, 2008

Mom Sleeping Nylon Feet

StackPanel items in reverse order View

The StackPanel in WPF Controls can arrange with each other.

The property Orientation = horizontal, it is possible to order the elements from left to right.

But there is no property stack items from = "Top ItemControl but requires a panel to represent the objects can be. The default is a StackPanel.

about the items property panel, we can define a ItemsPanelTemplate to specify the other derived from Panel "panel", in which now the items are arranged.

look like the objects determines a DataTemplate. For each item the ItemsControl generates a container (ContentPresenter for ListBox -> ListBoxItem). Since one of these containers can not be directly accessed, defines the ItemsControl a property to the style of the "ItemContainer Set can.

turvy world

To now order the items from the bottom up instead of top to below, as it makes the StackPanel, we need another panel. A DockPanel is suitable because there is more than one possibility, to arrange elements in it. (Top, Left, Right, Bottom).

Now we have to define in ItemContainerStyle that the items should be disposed of in each case below.




\u0026lt;


ItemsControl

>


\u0026lt; ItemsControl.ItemsPanel
>


< ItemsPanelTemplate
>


< DockPanel
VerticalAlignment

="Top"

LastChildFill
="False" />
</ ItemsPanelTemplate
>


</ ItemsControl.ItemsPanel
>


< ItemsControl.ItemContainerStyle
>


< Style
>


< Setter
Property

="DockPanel.Dock"

Value
="Bottom"/>
</ Style
>


</ ItemsControl.ItemContainerStyle
>


 

<
Button

>

1

</
Button
> < Button
>

2

\u0026lt;/
Button
> \u0026lt; Button
>

3

\u0026lt;/
Button
> \u0026lt;/ ItemsControl
>

Et Voila

How To Catch Rayquaza Shiny Easier

AttachedProperties properly initialize

Sometimes it is appropriate to after an object has registered with a property attached, perform some initialization. Here, in the set method by placing the attached property, such as an initialization method will be called.


SetAttachedProperty (

DependencyObject obj, int

value)
{
obj.SetValue (attached property, value);

InitializeProperty ();}



The Set method does nothing more than calling for the passed DependencyObjekt

SetValue

. The actual value of the attached property is set so as a normal DependencyProperty. Just imagine Just imagine a DependencyProperty is nothing but a key is stored with a value in a Dictionary. Each DependencyObject has such a dictionary. The values can also be queried by other objects and set.
To set an attached property, it actually made only the DependencyProperty object on your own to share, not the container object by

set [property]

! This also means that the initialization is no longer called, because the attached property is set on a different path. Now you can make it to the Convention in the course in an API requires that AttachedProperties must be set always set [property]
. So the plan is XamlReader instructed that if he attached a property in the markup recognizes a corresponding set method is available that can call it.

Nevertheless, it is better to perform an initialization different. How? Through a callback mechanism. Each DependencyProperty has metadata that allow code and callbacks for validation, deposit changes, etc.. A change as the value of a DependencyProperty, then the callback is called and initialization can be performed. This mechanism operates independently was set as a DependencyProperty.

public static

ReadOnly


DependencyProperty

property with call back;

/ / Define the metadata callback

PropertyMetadata

metadata =

new

PropertyMetadata ();

metadata.PropertyChangedCallback + = OnPropertyWithCallbackChanged;.

/ / register the DependencyProperty


property with callback =
DependencyProperty

RegisterAttached (

"property with call back"
,


typeof ( int ) , typeof (Window1
), metadata);


/ / The callback calls the real Initializierungsmethode
private


static

void
OnPropertyWithCallbackChanged (

DependencyObject obj,

DependencyPropertyChangedEventArgs value)
{
InitializeProperty ();}


Wednesday, May 7, 2008

Khao San Road Bikini Wax

own lines in Grid Panel draw


The grid is the most powerful and most frequently used panels in WPF.

The property ShowGridLines Show Guides.

Grid

ShowGridLines

= "True">



These lines serve only as an aid for the developer, who can thus detect the position of columns and rows.


Unfortunately you can not determine how these lines look like himself. Or anything yet?

What actually happens when the grid is set ShowGridLines = True?

WPF Controls can distinguish itself, in which they OnRender method override. As is the case with OnPaint in WinForms.


But the Grid is not made use of to draw the lines! Instead, the logical UI elements in the panel, an additional visual element of "grid line renderer added. This does not happen by ControlTemplate. (Templates also change the look so the VisualTree), special programmatically by calling AddVisualChild (visual) in the base class.


The grid line renderer is derived from DrawingVisual. DrawingVisual UIElement and thus have the same ancestor, "Visual". DrawingVisuals are much more efficient than UIElement, because it directly on the "screen" (WPF subsystem) are distinguished.

shows the VisualTree in XamlPad that to be logical Child - a button - found in the hierarchy - have a visual element - the grid line renderer is.





Option 1: A separate grid line renderer Leave

My first idea was to write your own grid line renderer. True to the model of the place in the grid renderer.
The problem is that it is not possible the renderer in the VisuallTree the grid insert. The method that would make this possible - AddVisualChild - is in fact protected. create

A separate grid, draw only the grid lines to me but was too expensive.

There must be a other way of expressing.

Option 2: Write a GridLinesAdorner

If there is no way to change from a UIElement inside without a separate control to derive, so you have to try it just from the outside. The so-called make Adorner.

Adorner "decorate" a UIElement. How that determines the Adorner. It is important that a Adorner will always be drawn to a UIElement. That is, the Adorner hidden beneath drawings.


Public


Class

GridLinesAdorner


Inherits Adorner


Private Grid As
System.Windows.Controls.Grid



'surrender to the ornamental element (in this grid)


Sub


New (
ByVal grid As

System.Windows.Controls.Grid)



MyBase . New (grid)

Me

. Grid grid =

End Sub





Private _pen
As
Pen



'pen and draw the lines can be


Public


Property Pen () As
Pen


Get

Return

_pen

End


Get


Set (ByVal
value
As Pen)

_pen = value
End

Set



End
Property




'draw the lines




Protected Overrides Sub
OnRender (

ByVal dc As
System.Windows.Media.DrawingContext)

If Pen Is Nothing

Then


Exit Sub

 

If Grid.ColumnDefinitions.Count > 0
Then


Dim
x As
Double


For i As

Integer
= 1
To

Grid.ColumnDefinitions.Count - 1


x = Grid.ColumnDefinitions(i).Offset
dc.DrawLine(Pen, New Point(x, 0),
New
Point(x, Grid.ActualHeight))


Next

End


If

 

If grid.RowDefinitions.Count > 0
Then


Dim
y As
Double


For i As

Integer
= 1
To

Grid.RowDefinitions.Count - 1


y = Grid.RowDefinitions(i).Offset
dc.DrawLine(Pen, New Point(0, y),
New
Point(Grid.ActualWidth, y))


Next

End


If

 

End
Sub



End

Class


OnRender now leads the way by drawing the grid lines. On the row and column definitions of the grid, the offset of each column are retrieved from the Grid. These serve as coordinator for the corresponding lines at these points to draw. bring
Applying Adorners
To Adorner used, we now need to adapt the code-behind file. Unfortunately, it is not possible to apply directly Adorner in XAML. (The class AdornerDecorator is only there for a layer to provide a decorative element on which a Adorner can be used, but not for the sender itself Adorner)


Class Window1




Private Sub
Window1_Loaded (ByVal

As


Object, ByVal e
As System.Windows.RoutedEventArgs) Handles Me .
Loaded 'layer for the element to get drawn in which the Adorner is

Dim layer As
AdornerLayer = AdornerLayer.GetAdornerLayer ( Me
. Grid)


'Adorner create with pen

Dim

Adorner As

New
GridLinesAdorner (Grid)


adorner.Pen = New Pen (Brushes.Black, 2)

'Adorner the Add Layer


layer.Add (Adorner)



End

Sub



End

Class


The result



who still surrounded by a frame around the grid would like to have, the need to pack only the grid in a border.


Note: As you can see the Adorner


is drawn on the grid. Therefore, the edges of the grid located buttons are not visible completely. here will still need an appropriate margin to be applied to the buttons to allow the correct distance from the grid inside.





Tuesday, April 29, 2008

Does Mw2 Have A Content Filter?

WPF goes Transitions

effects a la PowerPoint? WPF with no problem?

Although WPF provides animation support, but they must be laboriously programmed.


Now there is a framework, the transition effects for WPF provides.

as Wipe, Fade, or RotatingCube. Even complex 3D animation are freely available. Developed


has the

Jaraed Bienz.

Whoever might say, "Hey, I've seen schonmal!"
has absolutely right. On the last Basta I gave a talk on CAB and Acropolis presented. For me Acropolis had no Zukunfstaussichten (If yes pulped too). However, some components had to be intigriert potential in WPF. Including the Transition Framework.

is true that the Transition Framework (yet) a part of WPF. But still very useful, especially as freely accessible and extensible.



Saturday, April 26, 2008

Does Compressed Air Cause Static

The beauty of the desert - and the other side ...

After about a week in the desert, I have made myself cozy over lunch in the shade. I was all alone on that thin steaks, the others were scattered somewhere on the wide wadi. I'm lying on a mat and listen to music just as suddenly, as if from nowhere, a group run by black Africans. About 8 guys walk past me and greet me in Arabic and French, and walk.

I was floored, I never thought that we meet there such people. It is a subject that is silenced in our more ... Refugees from Sudan, Nigeria and Niger are reflected frequently questionable "leaders" through the Sahara, and try to reach the oasis cities of Ghat in Libya and Djanet in Algeria, from where they want to get through to the Mediterranean. Final destination of the refugees is Europe, where they hope a better life. A life without hunger, without fear, without poverty. But the desert is tricky ... A day without water in the summer, and it is dead too, we are such a begenet, or his remains. He is dying of thirst on the march through the desert and his dead body was covered with stones. Wild animals have dragged his bones, ribs, parts of the spine and leg bones were scattered on the floor, as well as his skull. I then searched his remains together and to be "grave" down. I did not want his remains were so distributed on the floor ...

met after 10 days, we are a second group of refugees. We gave them water, canned food, given bread, oranges and biscuits. One then said to me, "thank you, god bless you sister." They have nothing of it except for a small water container, a thin blanket and a small backpack. Hopefully They somehow find their way to a better life, no matter where.

Sunday, April 13, 2008

Rapid Heart Beat Numb Arm

Tassili n'Ajjer, March 2008













Wednesday, April 2, 2008

Virtual Haircut For Men Free

Algeria in March 2008 anecdotes


In March 2008 I spent two weeks in the Algerian Sahara road, in the Tassili n'Ajjer. It was an incredibly impressive time, I experienced a lot and met wonderful people. Unfortunately, the time in the desert was as always too short ... But I will return:)