I am integrating a WebKitBrowser
into a C# application, using WPF to implement the GUI for the application.
Having just added 'tabbed viewing' functionality to the application (where the user can select one tab to view the application, and another tab to view a web browser inside the application window), I now want to add navigation buttons to the form, similar to that of a standard web browser (i.e. 'Back', 'Forward' & 'Refresh' buttons).
I have the following markup in my .xaml
file:
<Grid>
<Menu IsMainMenu="True" Background="White">
...
<Ribbon x:Name="NavMenu" SelectedIndex="0" Width="928" Height="30">
<RibbonButton SmallImageSource="...\navigateBack.png" Height="5" Width="5" />
</Ribbon>
</Menu>
<TabControl agent="clr-namespace:Agent" Margin="0,29,-0.4,0.4">
<TabItem Header="Application">
...
</TabItem>
<TabItem Header="Browser">
...
</TabItem>
</TabControl>
</Grid>
However, when I run my application, although I can see the 'menu' Ribbon
that I have added (alongside the application MainMenu
, and above the TabControl
), the button that I have added to the ribbon seems to be quite 'low' (i.e. it is displayed behind the 'tab' controls), so I can only see the top of the button.
In the Design view in Visual Studio, I can see that the ribbon is displayed at the same height as the MainMenu
, so its contents should be displayed above the tabs, but at the moment, the button that I have added to the ribbon is being displayed behind the tabs...
Is there a way that I can set the position of the button on the ribbon, so that it is bound to the top of the ribbon, so that the whole button will be shown above the tabs?
I have tried looking for a position
or x
& y
attributes that I can set on the <RibbonButton />
tag in XAML, but can't seem to find anything that does what I want here- anyone have any suggestions?
答案 0 :(得分:1)
更为规范的解决方法如下(可能会纠正问题)
if($key == "y"){
$code = str_replace(["<", ">"], ["<", ">"], $code);
}