Yesterday I recorded a DNR TV session about NHibernate. Carl has been very gracious about some technical difficulties on my end and my spoken English. It should air in about 3 - 4 weeks.
I have made some progress since my last post, I now have removed the TextBlock hacks and am using buttons with replaced UI. The even look nice. I can't figure out how to get accelerator keys to work, I am pretty sure that I am doing everything right, but it doesn't work.
The button:
<Button
Name="Next"
Grid.Column="2"
Click="Next_Click" >
_Next >>
</Button>
The style (sans some UI stuff to make it shorter):
<Style TargetType="{x:Type Button}" >
<Setter Property="Cursor"
Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border
Background="{StaticResource NormalBrush}"
BorderBrush="{StaticResource NormalBorderBrush}">
<TextBlock Style="{StaticResource BigText}"
Name="TextField"
Text="{TemplateBinding Property=Button.Content}">
<ContentPresenter RecognizesAccessKey="True"/>
</TextBlock>
</Border>
<ControlTemplate.Triggers>
<Trigger
Property="Button.IsPressed"
Value="True">
<Setter TargetName="Border"
Property="Background"
Value="{StaticResource PressedBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
The way it looks:
Another issue that I am not sure how to solve is putting more controls on the navigation bar of the application:
I am pretty sure that this involves overriding the style for NavigationWindow and doing something there, but I haven't been able to figure it out yet. The new stuff is in the repository if you feel like looking at it, of course.
So here I am, only 3 days into WPF, and I have an interesting interview question. Given the following, what will be the title of the page? Why?
XAML:
<Page x:Class="Browser.BlogViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Foo">
</Page>
Code:
public partial class BlogViewer : Page
{
public BlogViewer()
{
Title = “Bar”;
}
}
And no, that is not spam.
In the meantime, I had to make do with a really shitty technology presentation* to a customer, I lost about a day of work trying to make it work, etc. In a word, yuck!
The solution for my trouble was here.
Now excuse me, I got a lot of torn hair to gather back.
Apperantly this is not a valid C# code:
user.SetToAdmin()/>
I started to get this types of errors all over the place after the SP install rolled back. Googling the results, is looks that I am not the only one with the problem, and there doesn't seem to be a solution in sight.
WTF!
Just to remind you, this is the RTM version of the SP1 that I tried to install
After testing the SP1 RTM on my home machine (which I consider OKAY to scratch), I tried to install it on my work machine, where it is not okay for things to fail. I let it run all night, and it produced this error. Now attempting to re-install Web Application Projects (which I had to remove before) fails, VS without Web Applications is hosed.
Here is the last part of the logs:
MSI (s) (94:20) [08:43:57:479]: Executing op:
ComponentRegister(ComponentId={544FDEE8-F34D-4EC0-A970-ABBF31A0BD9A},KeyPath=<\Microsoft.VisualStudio.TeamSystem.PerformanceWizard,Version="8.0.0.0",FileVersion="8.0.50727.42",PublicKeyToken="b03f5f7f11d50a3a",Culture="neutral",ProcessorArchitecture="MSIL",State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
MSI
(s) (94:20) [08:43:57:479]: MSCOREE not loaded loading copy from system32
MSI
(s) (94:20) [08:43:57:599]: Assembly Error:Function not defined in specified
DLL.
MSI (s) (94:20) [08:43:57:599]: Note: 1: 1935 2: 3: 0x8002802F 4: 5:
CreateAssemblyNameObject 6:
Microsoft.VisualStudio.TeamSystem.PerformanceWizard,Version="8.0.0.0",FileVersion="8.0.50727.42",PublicKeyToken="b03f5f7f11d50a3a",Culture="neutral",ProcessorArchitecture="MSIL"
MSI (s) (94:20) [08:43:57:599]: Transforming table Error.
MSI (s) (94:20)
[08:43:57:599]: Transforming table Error.
MSI (s) (94:20) [08:43:57:599]:
Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (94:20) [08:43:57:599]:
Transforming table Error.
MSI (s) (94:20) [08:43:57:599]: Transforming table
Error.
MSI (s) (94:20) [08:43:57:599]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (94:20) [08:43:57:659]: Transforming table Error.
MSI (s) (94:20)
[08:43:57:679]: Transforming table Error.
MSI (s) (94:20) [08:43:57:679]:
Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2908: Could not register
component {544FDEE8-F34D-4EC0-A970-ABBF31A0BD9A}.
MSI (c) (D4:0C)
[08:43:57:729]: Font created. Charset: Req=0, Ret=0, Font: Req=,
Ret=Arial
I found some information about it here, it is dated, but I think that I will give it a try.