Saturday, February 28, 2009
myDock 0.9.1051 is released
New version is available on alexezh.googlepages.com. Update includes minor fixes.
Sunday, February 22, 2009
Subsclass UserControl in SilverLight
By default Expression creates custom controls derived from UserControls
partial class MyControl : UserControl
{
}
In order to derive from a different class you will have to change code in several places
Define new base class with required virtual methods. Do not make class abstract
public class MyUserControl : UserControl
{
public virtual void Foo() {;}
}
Change MyControl to use MyUserControl
partial class MyControl : UserControl
{
public override void Foo() {;}
}
Change XAML for MyControl to use
<MyUserControl x:Class="MyControl">
</MyUserControl>
To make Blend happy, add following lines to AssemblyInfo.cs
// Make blend happy
using System.Windows.Markup;
[assembly: XmlnsDefinition("http://schemas.microsoft.com/client/2007", "YourNamespace")]
partial class MyControl : UserControl
{
}
In order to derive from a different class you will have to change code in several places
Define new base class with required virtual methods. Do not make class abstract
public class MyUserControl : UserControl
{
public virtual void Foo() {;}
}
Change MyControl to use MyUserControl
partial class MyControl : UserControl
{
public override void Foo() {;}
}
Change XAML for MyControl to use
<MyUserControl x:Class="MyControl">
</MyUserControl>
To make Blend happy, add following lines to AssemblyInfo.cs
// Make blend happy
using System.Windows.Markup;
[assembly: XmlnsDefinition("http://schemas.microsoft.com/client/2007", "YourNamespace")]
Sunday, February 15, 2009
Better version of VS windows hiding tool
Remembers which windows were shown the last time. Source is available at http://alexezh.googlepages.com/MyMacros.txt
Sunday, January 25, 2009
Optimize VS workspace by hiding tool windows
Simple macro toggles all tool windows
Dim showToolWindows As Integer Public Sub MyToggleToolWindows() If (showToolWindows = 1) Then showToolWindows = 0 Else showToolWindows = 1 End If For Each window As Window In DTE.Windows ' Check that this is a tool window and not a document window. If (window.Document Is Nothing) Then ' hide window. Try window.Visible = showToolWindows Catch exception As Exception End Try End If Next End Sub |
Sunday, January 11, 2009
SL unmanaged helpers on codeplex
I posted updated version of unmanaged helpers for accessing SL object model. With helpers you can write code in C++ which matches C# or jscript.
For example here is how to add an event handler to an object
vObj.addEventListener(L"MouseEnter",
CXcpDelegateT(CObject)::create(this, &CObject::OnMouseEnter));
Source code is available on http://www.codeplex.com/mydock
For example here is how to add an event handler to an object
vObj.addEventListener(L"MouseEnter",
CXcpDelegateT(CObject)::create(this, &CObject::OnMouseEnter));
Source code is available on http://www.codeplex.com/mydock
Back to basics
I spent last few month designing new UI for myDock. Test version of UI did not work very well, so I am returning back to original code.
On the good side, I mastered a process of hosting SL2.0 including managed code from unmanaged applications. See details on http://www.codeplex.com/mydock
1051 version will be available in few days
On the good side, I mastered a process of hosting SL2.0 including managed code from unmanaged applications. See details on http://www.codeplex.com/mydock
1051 version will be available in few days
Tuesday, September 23, 2008
Subscribe to:
Posts (Atom)
