flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > Manifest style. How apply my style for buttons ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 471
Code:
section '.rsrc' resource data readable
  directory  RT_MANIFEST, manifest

  resource manifest, 1, LANG_NEUTRAL, xpstyle

  resdata xpstyle
          file 'winxpstyle.xml'
          ;file 'xmlstyle.txt' ;get me error 
  endres      


Error:
The application could not be started because its parallel configuration is incorrect. Sxstrace.exe for more information.

If i comment file 'xmlstyle.txt' my program run but not have my style.

I found msdn https://docs.microsoft.com/en-us/windows/uwp/design/basics/xaml-basics-style style button:
Code:
;in xmlstyle.txt
<Page.Resources>
    <Style x:Key="PurpleStyle" TargetType="Button">
        <Setter Property="FontFamily" Value="Lucida Sans Unicode"/>
        <Setter Property="FontStyle" Value="Italic"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="MediumOrchid"/>
    </Style>

    <Style TargetType="Button">
        <Setter Property="Foreground" Value="Orange"/>
    </Style>
</Page.Resources>

<Grid x:Name="LayoutRoot">
    <Button Content="Button" Style="{StaticResource PurpleStyle}"/>
    <Button Content="Button" />
</Grid>
    
Post 30 Oct 2018, 10:54
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7289
Location: Kraków, Poland
Windows actually provides a very good hints how to debug such errors - with Sxstrace.exe tool. If you run Sxstrace.exe yourself, it even gives nice little examples.

To log the errors, open a console window with administrative privileges and run a command like:
Code:
SxsTrace Trace -logfile:SxsTrace.etl    
Then run your program in parallel, any manifest-related errors are going to be logged into .etl file.

End the SxsTrace.exe by pressing Enter in its window, and then run the following command to convert the log into readable .txt form:
Code:
SxsTrace Parse -logfile:SxsTrace.etl -outfile:SxsTrace.txt    
Post 30 Oct 2018, 12:23
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 471
My OS Windows 7 64 bit.

Info: manifest: app&#x20;name&#x20;goes&#x20;here,processorArchitecture="&#x2a;",type="win32",version="1.0.0.0"
Error: line 12: the Page.Resources element is a child of the urn: schemas-microsoft-com: asm.v1 ^ description, which is not supported by this version of Windows.
Post 30 Oct 2018, 12:46
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 471
What do uxtheme.dll ?
Post 30 Oct 2018, 16:16
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 471
I put in manifest.xml
Code:
<Window x:Class="WindowStateTest2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>

        <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>
        <Button Click="btnClear_Click" Grid.Row="0" x:Name="btnClear">Clear</Button>            

        <TextBox Name="txt" VerticalScrollBarVisibility="Visible" Grid.Row="2"></TextBox>
</Grid>
</Window>
    


Now my program run but not hapens on my window. I see only my siple white window.
In my Windows 7 instal Net 4.0.

And without:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

manifest.xml get error and my program not run !
Post 31 Oct 2018, 02:27
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 471
In my program i do:
Code:
icex INITCOMMONCONTROLSEX sizeof.INITCOMMONCONTROLSEX, ICC_ALL_CLASSES
invoke  InitCommonControlsEx, icex
    
Post 31 Oct 2018, 02:37
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 471
I download XamlPadX 4.0
And do:
Code:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:sys="clr-namespace:System;assembly=mscorlib" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
 <Button Height="200" Width="100">
 </Button>
</Page>
    

And i see button 200x100 size in XamlPadX 4.0.
But if i put this code in manifest.xml i see nothing on my program window.
Post 31 Oct 2018, 03:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.