richtextbox printing with fixed header and footer - wpf

Hell Everybody,
I need to provide a facility like letters printing.for letter formats i used a richtextbox to create different formats(Templates).now i need to print this formats with header.Heder information will change always and header height should be fixed for the page.For header informtion displaying also i took one Richtextbox.now i want to merge these two richtext box information before printing.but i failed to maintained the fixed header,if i merge the textboxs information.
Suggest me,what way is better to handle this.

Related

Looking for guidance on how to add custom class to sections and modules in Squarespace?

I have a client who is using Squarespace and asked that I fix a mobile stacking issue.
I have 2 rows that have image + text alternating side by side. This looks fine on desktop, but the on mobile the stacking order is wrong.
Desktop Stacking:
Image + Text
Text + Image
Current Mobile Stacking:
ImageĀ 
Text
Text
Image
Ideal Stacking:
Image
Text
Image
Text
Typically I was accomplish this by alternating the sections with a custom class, but I'm not seeing any place to add this. Are you able to add custom classes to sections?
Any help is appreciated. Thanks!
It is not possible to directly edit the markup that appears within Squarepace's default grid and block system (they call it, "LayoutEngine"). Generally speaking, one must either write their own HTML within a Code Block (or via Code Injection points), or use JavaScript to alter the HTML after the default markup is loaded onto the page.
But in your case specifically, this is a common problem in Squarespace, and it is usually solved with just CSS, using a combination of:
first-child, last-child and nth-child selectors, and/or
the > direct-descendant/child-combinator, and/or
specific block IDs (each sqs-block has a unique id attribute), and/or
a media query so that the rules only take affect after your mobile breakpoint is reached, and/or
either display:flex with the order property. or display:table-header with display:table-footer in order to force a different stacking order.
The specific CSS often varies greatly based on the specific circumstance, whether you're trying to reorder blocks, columns, or rows. The similar question linked to above provides a specific solution to the same problem you are trying to solve, but the code that solves it in your case may look quite different, though it will likely use a combination of the five things mentioned above.
Or, you can use JavaScript to target the blocks and add your own classes, then write the CSS with those classes. Even in that case, the general approach is the same.

WPF style info from external text file

Not sure if this is possible, but I have a WPF application that now has a requirement to be skinnable.
Basically, this equates to several key colours and a couple of logos.
Is there any way of grabbing the hex values for the colours in defined styles from an external (ie comes with the application but isn't compiled) text/xml file?
I want to be able to select the colours, create the file and then deploy to the user with the application so that I don't have to maintain multiple versions.
I'm not even sure that this is the best way to achieve what i'm after.
Has anyone done anything akin to this?
I would be extremely grateful if someone could point me in the right direction.
Thanks
just hold the color values in a config file simple text file will suffice.
though you can use VisualStudio Resource file..
file will contain lines in each:
item_enum_name item_type item_value
for example:
main_screen_bg_color Color Black
company_logo URI \logos\logo1.jpg
and so on..
just load the file parse it and use bind to the values...

Need to provide spaces between cells in UITableview in ios

I need to provide space between cells in UITableview.And I am also posting an image which consists of here two cells.I have gone through previous posts,but I am unable to find a suitable answers.
Thanks coders
There are several ways to achieve this, and none as simple as you may expect, the two ways that come to my mind right know are:
Define your custom cell to add an space on bottom by playing with the foreground background. If you dont need the space (for instance at the last cell) resize the cell to hide it.
Use a grouped table with one section per cell so you can use that section as space

Increasing the size of a WPF application

I've just created my first WPF application (3 calculators inside 3 different tabs).
The entire application has been built using widths/margins/paddings as static values, since I originally didn't know that dynamic values can be used by just putting an asterix after the value.
The client has come back to me though and has asked me to increase the size of the app, that includes form fields, tabs, font-sizes, grids etc...
What would be the easiest (and/or quickest) way to do this? I'd hate to go value by value resizing every single element since there are quite a few.
I can provide code but there is lots of it and I'm not sure of how much help it would be.
Appreciate your help,
Marko
Put it all in one ViewBox, play with viewbox size to change the app size
Write an XSLT transform to take your XAML as input and spit out appropriate modified XAML, which you put back in your app.

I want to know the number of times the same image has been added to the ListBox of images

I have a ListBox of images. I want to know the number of times the same image has been added to that ListBox. Any solutions?
If you want to check that the image itself, regardless of the file name, is not repeated then generate an MD5 checksum for the image data and store that.
If you want to make sure that the two are always linked then either tag it onto the end of the file or create a class which holds the image and the checksum together.
The MD5 check can be used to differentiate any data file, even different versions of the same file if the content is in anyway different.

Resources